Re: [Boost-bugs] [Boost C++ Libraries] #3424: cflags don't affect C++ compiler

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3424: cflags don't affect C++ compiler
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-14 06:36:17


#3424: cflags don't affect C++ compiler
--------------------------+-------------------------------------------------
 Reporter: andysem | Owner: vladimir_prus
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: build
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------

Comment(by andysem):

 I'm using MSVC 7.1 with STLPort. I don't have a minimal example, I was
 just trying to build Boost 1.40 with the following script (I used Cygwin
 to run it):

 {{{
 export HAVE_ICU=1
 export ICU_PATH="$ROOT_DIR/ThirdParty/icu"
 export ICU_LINK="/LIBPATH:$ROOT_DIR/ThirdParty/icu/win32/lib icuuc.lib
 icuin.lib icudt.lib"

 export ZLIB_BINARY=zlib
 export ZLIB_INCLUDE=$ROOT_DIR/ThirdParty/ZLib/inc
 export ZLIB_LIBPATH=$ROOT_DIR/ThirdParty/ZLib/lib/win32

 tools/jam/src/bin.ntx86/bjam.exe -d+2 -j 2 --stagedir=stage.vc7
 toolset=msvc stdlib=stlport variant=release link=shared runtime-
 link=shared threading=multi optimization=speed inlining=full rtti=on
 exception-handling=on debug-symbols=on "cflags=-G7 -arch:SSE2 -Oi -GL"
 "linkflags=/LTCG /OPT:REF,ICF $ICU_LINK" --without-python --without-wave
 --without-mpi stage
 }}}

 The user-config.jam is in the tools/build/v2 directory (excessive
 commented lines stripped):

 {{{
 # -------------------
 # MSVC configuration.
 # -------------------

 # Configure msvc (default version, searched for in standard locations and
 PATH).
 using msvc ;

 # ----------------------
 # STLPort configuration.
 # ----------------------

 # Configure specifying location of STLPort headers. Libraries must be
 either
 # not needed or available to the compiler by default.
 # using stlport : : /usr/include/stlport ;

 # Configure specifying location of both headers and libraries explicitly.
 using stlport :
     : "<absolute_path_to_ThirdParty>/ThirdParty/STLport/stlport"
     : "<absolute_path_to_ThirdParty>/ThirdParty/STLport/lib/win32" ;
 }}}

 The resulting build log contains compiler flags, and "-G7 -arch:SSE2 -Oi
 -GL" are missing. When cflags are changed to cxxflags it works as
 expected.

 BTW, it's not mentioned in the initial posting, but I had another problem
 with user-config.jam. You see these "<absolute_path_to_ThirdParty>" parts?
 I had to write a perl script to fill these in, based on my current path
 configuration in the ROOT_DIR environment variable. When I tried to
 specify "$(ROOT_DIR)/ThirdParty/STLport/stlport" I got build errors that
 basically said that there were too many arguments for stlport rule.
 Apparently, it took the colon after the drive letter as a delimiter
 between rule parameters. I failed to work it around except to write a perl
 script that would substitute the <absolute_path_to_ThirdParty> placeholder
 with the expanded value of ROOT_DIR, then it worked (even though the colon
 is still there).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3424#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC