[Libreoffice-commits] .: solenv/inc

Caolán McNamara caolan at kemper.freedesktop.org
Wed Feb 2 05:08:17 PST 2011


 solenv/inc/unxgcc.mk |   23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

New commits:
commit d3539afd369e4fa31eb4b6047c5c101dc4766c64
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Feb 2 13:07:07 2011 +0000

    Use DT_RUNPATH over DT_RPATH
    
    So that dlopen will load the .so found in LD_LIBRARY_PATH before the one found
    via path of ORIGIN, this way any unit tests trying to set a uno component
    implemented as a shared library will test the local .so and not the one in the
    solver

diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index 13fef31..2261e25 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -159,15 +159,26 @@ LINK*=$(CXX)
 LINKC*=$(CC)
 
 # default linker flags
+#
+# The DT RPATH value is used first, before any other path, specifically before
+# the path defined in the LD_LIBRARY_PATH environment variable. This is
+# problematic since it does not allow the user to overwrite the value.
+# Therefore DT_RPATH is deprecated. The introduction of the new variant,
+# DT_RUNPATH, corrects this oversight by requiring the value is used after the
+# path in LD_LIBRARY_PATH.
+#
+# The linker option --enable-new-dtags must be used to also add DT_RUNPATH
+# entry. This will cause both, DT_RPATH and DT_RUNPATH entries, to be created
+#
 LINKFLAGSDEFS*=-Wl,-z,defs
-LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
-LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
+LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\',--enable-new-dtags
+LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\',--enable-new-dtags
     #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
-LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
-LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
-LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
+LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\',--enable-new-dtags
+LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\',--enable-new-dtags
+LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\',--enable-new-dtags
 LINKFLAGSRUNPATH_OXT=
-LINKFLAGSRUNPATH_BOXT=-Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\'
+LINKFLAGSRUNPATH_BOXT=-Wl,-rpath,\''$$ORIGIN/../../../basis-link/program'\',--enable-new-dtags
 LINKFLAGSRUNPATH_NONE=
 # flag -Wl,-z,noexecstack sets the NX bit on the stack
 LINKFLAGS=-Wl,-z,noexecstack -Wl,-z,combreloc $(LINKFLAGSDEFS)


More information about the Libreoffice-commits mailing list