summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-03-24 22:45:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-03-25 08:25:22 +0100
commit23245f723fb29262b8543d6447d1b0bb69cb50fb (patch)
treefad76ecbf8f2450cb2e8198506fda2f6618ea2f5 /external
parenta504ed789272b932556f563f013bce3552d75109 (diff)
external/nss: Fix rpath for Linux et al
See CustomTarget_postprocess/check_dynamic_objects (in a --with-package-format=... build) failing after 8512f4ca090c85477a6670438aeefe7fdfcf8a98 "build nss using their new build system (gyp/ninja-based)" with > instdir/program/libsmime3.so has no RPATH > instdir/program/libnssutil3.so has no RPATH > instdir/program/libnssdbm3.so has no RPATH > instdir/program/libfreeblpriv3.so has no RPATH > instdir/program/libsqlite3.so has no RPATH > instdir/program/libfreebl3.so has no RPATH > instdir/program/libnssckbi.so has no RPATH > instdir/program/libnss3.so has no RPATH > instdir/program/libsoftokn3.so has no RPATH > instdir/program/libssl3.so has no RPATH workdir/UnpackedTarball/gyp/pylib/gyp/generator/ninja.py already has logic to add -Wl,-rpath=$ORIGIN/... to certain link command lines, presumably for building certain executables, but of which we apparently include none in ExternalPackage_nss, so it shouldn't hurt to keep them using that other -Wl,-rpath=$ORIGIN/... I have no idea whether there would be a cleaner way than this patch to pass an additional -Wl,-rpath=$ORIGIN to all link command lines via the invocation of build.sh in ExternalProject_nss (even if those executables mentioned in the previous sentence would then have two -Wl,-rpath=..., that should not hurt in practice). (Most, if not all of the rpath-related hunks of external/nss/nss.patch that were needed for the make-based nss build on Linux et al prior to 8512f4ca090c85477a6670438aeefe7fdfcf8a98 can probably be removed in a follow-up commit.) Change-Id: I65eaf52efeb6feceb8540e0aedf340f9a9a18599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r--external/nss/UnpackedTarball_gyp.mk3
-rw-r--r--external/nss/gyp-rpath.patch12
2 files changed, 15 insertions, 0 deletions
diff --git a/external/nss/UnpackedTarball_gyp.mk b/external/nss/UnpackedTarball_gyp.mk
index ce44ae51f996..72358686e97a 100644
--- a/external/nss/UnpackedTarball_gyp.mk
+++ b/external/nss/UnpackedTarball_gyp.mk
@@ -11,8 +11,11 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,gyp))
$(eval $(call gb_UnpackedTarball_set_tarball,gyp,$(GYP_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,gyp,0))
+
$(eval $(call gb_UnpackedTarball_add_patches,gyp,\
external/nss/gyp-buildsystem.patch.0 \
+ external/nss/gyp-rpath.patch \
))
ifeq ($(OS),WNT)
diff --git a/external/nss/gyp-rpath.patch b/external/nss/gyp-rpath.patch
new file mode 100644
index 000000000000..d918584c9745
--- /dev/null
+++ b/external/nss/gyp-rpath.patch
@@ -0,0 +1,12 @@
+--- pylib/gyp/generator/ninja.py
++++ pylib/gyp/generator/ninja.py
+@@ -1241,6 +1241,8 @@
+ else:
+ ldflags.append('-Wl,-rpath=%s' % self.target_rpath)
+ ldflags.append('-Wl,-rpath-link=%s' % rpath)
++ elif not is_executable:
++ ldflags.append('-Wl,-rpath=\$$ORIGIN')
+ self.WriteVariableList(ninja_file, 'ldflags',
+ map(self.ExpandSpecial, ldflags))
+
+