Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-06 07:51:46


Larry Evans wrote:

> >>where $(RPATH) is the path to the shared library, libstdc++.so.
> >
> > To be more specific, this is only if you don't path to add the path to
> > LD_LIBRARY_PATH. I believe that is the right method for making sure
> > system libraries are property found, why don't you want to use this
> > method?
>
> Because, so far, I've 2 gcc compilers on my system. I'm guessing
> that if the paths to their separate libstdc++.so's are both put
> in LD_LIBRARY_PATH, that the first will be selected. Is that
> OK?

I think that if compilers differ in version (e.g. 3.3 vs. 3.4), the name of
libstdc++ will be different (.5 vs .6, IIRC).

> Also, since I'm only using the 2nd gcc compiler for testing
> purposes, I don't want to "temporarily" change a "global" variable.

Understood.

> > that's not OK with you, we need to recall what Michael was suggesting:
> > that toolset should allow to pass additional compiler and linker options.
> > This is more general solution than just RPATH. So, you would write:
> >
> > using gcc : 3.4 : g++ : : -Wl,--rpath -Wl,whatever ;
>
> Yes. That's better. BTW, I was having trouble understanding how rules
> were parsed. For example, the original gcc.init was:
>
> rule init ( version ? : command * ) {...}
>
> I could guess what version ? meant, but initially I though command *
> meant command was the trailing elements. Testing indicated that,
> I guess, * means don't accept any more arguments.
>
> Is there somewhere the meaning of ? and * in rule formal argument
> lists is documented? If so, could you let me know?

That's documented in http://boost.org/tools/build/jam_src/#argument_lists

> Also, I was
> undertain how to use the rpath value from:
>
> rule init ( version ? : command : rpath ) {...}
>
> to do this:
>
> flags gcc.link OPTIONS <link-runtime>shared : -Wl,--rpath -Wl,$(rpath)
>
> could I just add this right after the:
>
> local rpath = $(rpath) ;

I think you better to look how intel-linux does it. In particular, the
compiler/linker flags should apply to specific version of compiler, so the
"flags" invocation should include that version. Intel-linux, for example,
has:

flags intel-linux CONFIG_COMPILE $(condition) : $(compile_options) ;

(I'm not sure why it uses CONFIG_COMPILE,

flags intel-linux.compile OPTION ......

will work just as well).

- Volodya

 


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