external/nss/UnpackedTarball_gyp.mk |    3 +++
 external/nss/gyp-rpath.patch        |   12 ++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit 23245f723fb29262b8543d6447d1b0bb69cb50fb
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Mar 24 22:45:23 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Mar 25 08:25:22 2020 +0100

    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 
    (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 
    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 
    this patch to pass an additional -Wl,-rpath=$ORIGIN to all link command 
    via the invocation of build.sh in ExternalProject_nss (even if those 
    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 
    needed for the make-based nss build on Linux et al prior to
    8512f4ca090c85477a6670438aeefe7fdfcf8a98 can probably be removed in a 
    Change-Id: I65eaf52efeb6feceb8540e0aedf340f9a9a18599
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91012
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/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))
Libreoffice-commits mailing list

Reply via email to