Boost logo

Boost-Build :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2004-09-05 22:52:13

As I mentioned previously here:

on method for doing a shared link with gcc is with the following
link flag:

-Wl,--rpath -Wl,$(RPATH)

where $(RPATH) is the path to the shared library,

Since this could be different for each version of gcc, it seems
that the user-config.jam file should allow something like:

using gcc : VERSION : COMMAND : RPATH ;

where, as now:

VERSION is the version number,
COMMAND is the compiler command

but, in addition:

RPATH is the path to the directory containing

I've made a partial change to gcc.jam which now has:

rule init ( version ? : command : rpath )
local condition = [ common.check-init-parameters gcc : version
$(version) ] ;

local command = [ common.get-invocation-command gcc : g++ :
$(command) ] ;

local rpath = $(rpath) ;

flags gcc CONFIG_COMMAND $(condition) : $(command) ;

and the output from bjam --v2 -d5 shows:

local command = /usr/local/gcc-3.4.1/bin/g++
local rpath = /usr/local/gcc-3.4.1/lib

so at least the right value is being passed to the init rule.
However, before I go any further in figuring out how to do this,
I'd like to know if anyone has a better way to do this?


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