Boost logo

Boost-Build :

Subject: [Boost-build] using gcc version on MAC OS
From: Robert Ramey (ramey_at_[hidden])
Date: 2014-06-25 17:39:21

I use Mac OS, Clang, and Xcode - so far so good.

Now I want to build and test a library with GCC version 4.7.2 which I have
installed at location /usr/gcc-4.7.2/bin/g++-4.7 and I can invoke it from
the command line with

$/usr/gcc-4.7.2/bin/g++-4.7 -v
Using built-in specs.
Target: x86_64-apple-darwin12.2.0
Configured with: ../configure -q --prefix=/usr/gcc-4.7.2 --enable-lto
--enable-checking=release --with-libelf=/usr/gcc-4.7.2
--with-gmp=/usr/gcc-4.7.2 --with-mpfr=/usr/gcc-4.7.2
--with-mpc=/usr/gcc-4.7.2 --with-ppl=/usr/gcc-4.7.2
--with-cloog=/usr/gcc-4.7.2 --program-suffix=-4.7 --silent
Thread model: posix
gcc version 4.7.2 (GCC)

I've altered my user-config.jam so that it contains:

using darwin : 4.7
   : /usr/gcc-4.7.2/bin/g++-4.7

Since things don't seem to be working I do some testing with:

$b2 --dump-tests -d2 -a toolset=darwin-4.7 cxxflags=-std=c++03 config_info
>b2.log &
which produces an output file:

Clang version 5.1 (clang-503.0.40)
    __cplusplus =199711L
    __STDC__ =1
    __GNUC__ =4
    __GNUC_MINOR__ =2
    __GNUG__ =4
    __STRICT_ANSI__ =1
    __VERSION__ ="4.2.1 Compatible Apple LLVM
5.1 (clang-503.0.40)"
    __REGISTER_PREFIX__ [no value]
    __LP64__ =1
    __MACH__ =1
    __APPLE__ =1
    __APPLE_CC__ =6000
    __STDC_HOSTED__ =1


libc++ version 1101


This suggests that my user-config and/or PATH and/or ??? needs to be tweaked
order to get this to work.

Any suggestions appreciated.

Robert Ramey

View this message in context:
Sent from the Boost - Build mailing list archive at

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