diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-03-08 16:05:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-03-08 22:00:58 +0100 |
commit | d4347f5d585232e1b025b4199ded53e6619d6242 (patch) | |
tree | e59e593a81ae74c0ec78e2482aaa5bd5fbe36d1f | |
parent | b18e2d80d7ed102645f7d6df75f521cd584c8a71 (diff) |
Fix external/gpgmepp Linux RPATH
In other external projects using libtool, we fix that by patching configure,
resetting hardcode_libdir_flag_spec[_CXX] at the end of the linux*) case block
that sets the Linux-specific value. But here we run autoreconf in
ExternalProject_libassuan, so that patch in configure would be overwritten. The
relevant code in configure comes from autoconf boilerplate, so we cannot just do
the same patch in configure.ac. But we can reset hardcode_libdir_flag_spec
sufficiently late in configure.ac so that things still work as intended.
Disable tests that would build executabes linking against libgpgme.so, which in
turn links against the libassuan and libgpg-error libs, which would no longer be
found by the linker because of the dropped -rpath flags. (Alternatives might
be to pass in LD_LIBRARY_PATH or to link with --allow-shlib-undefined.)
Change-Id: I7e37abf802d213347bd80383b7980d85cf0762d4
Reviewed-on: https://gerrit.libreoffice.org/50960
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rwxr-xr-x | bin/check-elf-dynamic-objects | 5 | ||||
-rw-r--r-- | external/gpgmepp/ExternalProject_gpgmepp.mk | 1 | ||||
-rw-r--r-- | external/gpgmepp/UnpackedTarball_gpgmepp.mk | 1 | ||||
-rw-r--r-- | external/gpgmepp/rpath.patch | 12 |
4 files changed, 15 insertions, 4 deletions
diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects index 4e3a4fccec44..5c484598b3b6 100755 --- a/bin/check-elf-dynamic-objects +++ b/bin/check-elf-dynamic-objects @@ -230,10 +230,7 @@ else if [ -s check_elf.out ] ; then cat check_elf.out - # FIXME known broken, ignore for now - if grep -v 'libgpgmepp.so.6\|libgpgme.so.11' check_elf.out >/dev/null; then - status=1 - fi + status=1 fi rm check_elf.out fi diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk index 3d6f0ac6e92b..452f922750d6 100644 --- a/external/gpgmepp/ExternalProject_gpgmepp.mk +++ b/external/gpgmepp/ExternalProject_gpgmepp.mk @@ -49,6 +49,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_ExternalProject_run,build,\ autoreconf \ && ./configure \ + --disable-gpg-test \ --enable-languages="cpp" \ GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk index df13d4976c7e..1f7496b9b043 100644 --- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk +++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk @@ -24,5 +24,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ $(if $(filter MSC,$(COM)),external/gpgmepp/w32-add-initializer.patch.1) \ external/gpgmepp/w32-build-fixes-2.patch \ $(if $(filter LINUX,$(OS)),external/gpgmepp/asan.patch) \ + $(if $(filter LINUX,$(OS)),external/gpgmepp/rpath.patch) \ )) # vim: set noet sw=4 ts=4: diff --git a/external/gpgmepp/rpath.patch b/external/gpgmepp/rpath.patch new file mode 100644 index 000000000000..e83dcf2762ef --- /dev/null +++ b/external/gpgmepp/rpath.patch @@ -0,0 +1,12 @@ +--- configure.ac ++++ configure.ac +@@ -176,6 +176,9 @@ + LT_INIT([win32-dll disable-static]) + LT_LANG([Windows Resource]) + ++hardcode_libdir_flag_spec= ++hardcode_libdir_flag_spec_CXX= ++ + # For now we hardcode the use of version scripts. It would be better + # to write a test for this or even implement this within libtool. + have_ld_version_script=no |