Boost logo

Boost-Build :

Subject: Re: [Boost-build] Option to turn off rpath?
From: Steve M. Robbins (steve_at_[hidden])
Date: 2010-09-07 02:18:32


On Tue, Sep 07, 2010 at 12:54:29AM -0500, Steve M. Robbins wrote:

> The second problem is that rpath is not appropriate for everyone.
> Debian, for example (http://wiki.debian.org/RpathIssue), strongly
> discourages its use. So I patched Debian packages to not use rpath.
> Could this be turned into a bjam option?

For reference, here's the patch. It seems like the "gcc.py" patch is
not necessary, however. Is that true? Why does the logic appear in
both gcc.jam and gcc.py?

--- boost1.44-1.44.0.orig/tools/build/v2/tools/gcc.jam
+++ boost1.44-1.44.0/tools/build/v2/tools/gcc.jam
@@ -823,7 +823,7 @@
 
 actions link bind LIBRARIES
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
 
 }
 
@@ -888,7 +888,7 @@
 # Differs from 'link' above only by -shared.
 actions link.dll bind LIBRARIES
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
 }
 
 rule setup-threading ( targets * : sources * : properties * )
--- boost1.44-1.44.0.orig/tools/build/v2/tools/gcc.py
+++ boost1.44-1.44.0/tools/build/v2/tools/gcc.py
@@ -586,7 +586,6 @@
 engine.register_action(
     'gcc.link',
     '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' +
- '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' +
         '-Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" ' +
         '$(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' +
         '-l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) ' +
@@ -648,7 +647,6 @@
     'gcc.link.dll',
     # Differ from 'link' above only by -shared.
     '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' +
- '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' +
         '"$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" ' +
         '$(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) ' +
         '-shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' +




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