So, I added a unit test for fdo#31271 and I see a little wrinkle with
out rpath stuff.
We set LD_LIBRARY_PATH to something like
../unxlngx.pro/lib:/path/to/solver/lib
to try and pick up the just-built library for testing purposes.
But when testing a uno component like i18npool.uno.so we dlopen it
through some intermediate libraries in /path/to/solver/lib and the
LD_LIBRARY_PATH is apparently not checked before the DT_RPATH in that
case, the intermediate libs DT_RPATH is used instead so the
i18npool.uno.so from /path/to/solver/lib is tested.
That's not quite what we want. So, the attached sets DT_RUNPATH which
does what we want, i.e. LD_LIBRARY_PATH override the rpath in that case.
Anyone see anything that could go wrong with doing this :-) ?
C.
diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk
index c090024..1f99cfc 100644
--- a/solenv/inc/unxgcc.mk
+++ b/solenv/inc/unxgcc.mk
@@ -160,14 +160,14 @@ LINKC*=$(CC)
# default linker flags
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)
Context
- [Libreoffice] unit tests and DT_RPATH/DT_RUNPATH ? · Caolán McNamara
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.