I need to pass -Wl,-rpath,\$$ORIGIN/lib/
to g++'s linker (reason). Is there a way to pass this argument in Jamroot file?
Asked
Active
Viewed 500 times
0

Ivan Vučica
- 9,529
- 9
- 60
- 111
2 Answers
2
Ivan Vucica already described how to do it by modifying the toolset. Another option is to add it to the properties of the project. At the top of your Jamroot, add the following rule (or modify a pre-existing project
rule).
project
: requirements
<toolset>gcc:<linkflags>"-Wl,-rpath,\\$ORIGIN/lib"
;
This will only affect gcc on this project, and works even if the current using gcc ;
command is called from outside Jamroot (as in Ubuntu's default configuration).
There might be a better way by somehow modifying the python-for-extensions alias that Boost.Build links against when calling python-extension, but I'm not sure how to do it, or even if it can be done.
0
To modify linkflags, use approximately:
using gcc : : : <linkflags>"-Wl,-rpath,\\$ORIGIN/lb" ;
Source: RTM

Funk Forty Niner
- 74,450
- 15
- 68
- 141

Ivan Vučica
- 9,529
- 9
- 60
- 111