Boost logo

Boost-Build :

Subject: Re: [Boost-build] clang trunk and -mthreads
From: Vladimir Prus (ghost_at_[hidden])
Date: 2013-10-03 02:33:10

On 03.10.2013 00:47, Eric Niebler wrote:
> I use b2 from trunk with clang from trunk under cygwin. I just rebuilt
> clang from trunk, and found it no longer works with trunk b2 because of
> this:
> clang: error: unknown argument: '-mthreads'
> "/usr/local/clang-trunk/bin/clang++" -c -x c++ -std=gnu++11 -O0 -g
> -fno-inline -Wall -g -mthreads -DBOOST_FILESYSTEM_STATIC_L
> -I"../../.." -I"/cygdrive/c/boost/org/trunk" -o "../../../bin/lib
> s/quick_check/test/test4.test/clang-linux-trunk/debug/link-static/threading-multi/qcheck/test4.obj"
> "qcheck/test4.cpp"
> Looks like clang no longer likes the -mthreads option. This should
> probably be dealt with in the b2 clang.jam file, but I don't know what
> to change. Any help?


Maybe you can adapt the logic we have for similar thing in darwin.jam, which goes like this:

     # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
     if $(real-version) < "4.0.0"
         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;

There's code above that determines 'real-version' by running compiler with the -dumpversion flag. It appears
that clang-linux.jam already runs the compiler with the --version flag, but only if not version is provided
by the user; that logic should be modified to match darwin - that is, to always set real-version so that we
can use that in such checks.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at