From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-11-11 09:31:30
> I've got some trouble when running
> bjam gcc-3.4 release/link-runtime=static/link=static
> using gcc : 3.4 : /usr/local/gcc-3.4.1/bin/g++ :
> <linkflags>-L/usr/local/gcc-3.4.1/lib ;
> Unfortunately, bjam output something like
> -L"/usr/X11/lib" -L"/usr/lib" -L"/usr/local/qt-3.3.2/lib"
> -o output-file
> <list of libraries>
> -static -L/usr/local/gcc-3.4.1/lib -Wl,--strip-all -pthread
> I've looked at the source and found that _all_ extra toolset-options are
> simply added to OPTIONS in common.jam at line 259 which value is append
> to rest of the commandline in gcc.jam at line 263.
> Inetrestingly, sun.jam does prepend the OPTION an line 91.
> So, I'm not sure how to resolve this.
> The only thing I know for sure is that the custom link options in
> toolset initialisation should be inserted _before_ all other option in
> order to override them.
Actually the reason the options are added to the end is that if you use
something like <linkflags>-lsome_static_lib, things won't link if
-lsome_static_lib is added to front of command line, and some libraries later
on the command line use symbols from some_static_lib.
Unless somebody has bright ideas, I think the only solution is to have
OPTIONS_BEFORE and OPTIONS_AFTER variables, and convert <linkflags> to
OPTIONS_BEFORE, which will be added to the front of command line.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk