id summary reporter owner description type status milestone component version severity resolution keywords cc 573 How to pass CXXFLAGS & LDFLAGS jeffclifford nobody "{{{ Hi, I have been trying to build the boost libraries on a Fedora Core 4 machine. I want to build a specific gcc334 version of the libraries that is 64-bit. I have followed the instructions on the Boost web site on how to configure boost specifically to pass CXXFLAGS and LDFLAGS. I shall run through what I have done: I am trying to build boost v1.33.1 1) I cd to BOOST_ROOT/libs/config 2) I run: sh ./configure CC=gcc334 CXX=g++334 CXXFLAGS=""-m64 -fPIC"" LDFLAGS=""-m64 -Wl,-rpath /apps/Linux64/gcc402/lib64 -fPIC"" 3) This creates a user.hpp that I copy to BOOST_ROOT/boost/config 4) I cd to BOOST_ROOT 5) I run: bjam -sTOOLS=gcc --builddir=./boost_1_33_1-objdir stage I then find that any compiler flags that I specified are simply ignored. Not only that but checking top I find that the libraries are being built with the default compiler instead of the one I specified. So I then tried the following command instead as the docs aren't clear what you need to specify to bjam after doing a specific configuration as above. bjam -sGCC_ROOT_DIRECTORY=/apps/Linux64/gcc334 -sGCC=gcc334 -sGXX=g++334 -sTOOLS=gcc --builddir=./boost_1_33_1-objdir stage This at least makes the correct compiler be used but still the CXXFLAGS and LDFLAGS are ignored. I notice there are other posts in this group where people have asked similar questions. Surely passing CXXFLAGS and LDFLAGS should be quite a simple thing to be able to do. I too am confused by the user.hpp containing the following which is commented: // // Use this file to define a site and compiler specific // configuration policy, this version was auto-generated by // configure on Tue Feb 28 16:06:50 GMT 2006 // With the following options: // CXX = g++334 // CXXFLAGS = -I./../.. -I./../../libs/config/test -m64 -fPIC -DBOOST_NO_CONFIG // LDFLAGS = -m64 -Wl,-rpath /apps/Linux64/gcc402/lib64 -fPIC // LIBS = -lrt -lm -lpthread // Are these options passed to some other file when the configure script is run? They don't seem to be; in which case is there some macro that holds these values. I have checked the docs but can't find a macro relating to these and checking the gcc.hpp file etc doesn't give any clues. I'd be really grateful if anyone can point to what I'm doing wrong and how I can get my desired build done. A specific example of how to do this in the boost documentation would be ideal. Many thanks, Jeff Clifford. }}}" Support Requests closed Building Boost None Problem None