summaryrefslogtreecommitdiff
path: root/external/liborcus
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-10 11:18:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-10 11:30:39 +0200
commit371cc81bd9ccbfbed25f810e70899c044280349e (patch)
tree518fb8f902a749b9f30c8a8d2ba810201aae496e /external/liborcus
parentc6dab8e7ba427df1cdc25ed4077dc0e443197bba (diff)
external/liborcus: Fix Linux RPATH
This has become necessary after edb38d702dd5a058ae0702b73a43328318b94649 "update to liborcus 0.9.1; Includes switching to dynamic libs." For one, pass -Wl,-rpath,$ORIGIN in via LDFLAGS, as is done for various external projects. For another, libtool (as internally used by liborcus) unhelpfully adds further -Wl,-rpath arguments of its own, to make the resulting lib in its presumed location find its dependent libs in their presumed locations. But we override all that to the single instdir/program/ directory and corresponding RPATH $ORIGIN anyway, so the simplest fix to get a clean RPATH appears to outsmart libtool's attempt add adding further -Wl,-rpath arguments by setting hardcode_libdir_flag_spec_CXX to empty (see the internals of libtool for why that works). Other external projects (like redland) suffer from this problem too and currently have a "dirty" RPATH; fix pending. Until libreoffice-4-1 that was generally not an issue, presumably because having all libs in solver happened to cause libtool not to emit any additional -Wl,-rpath arguments. Change-Id: I80dff5141a33c198f30aecb7c51b41bc06145f1c
Diffstat (limited to 'external/liborcus')
-rw-r--r--external/liborcus/ExternalProject_liborcus.mk4
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk1
-rw-r--r--external/liborcus/rpath.patch.010
3 files changed, 15 insertions, 0 deletions
diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
index 5c7736ee7709..98bc45b894ae 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -77,6 +77,10 @@ ifneq (,$(PTHREAD_LIBS))
liborcus_LDFLAGS+=$(PTHREAD_LIBS)
endif
+ifeq ($(OS),LINUX)
+liborcus_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN
+endif
+
$(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index ae569ede0524..6cae540d6c5f 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/0001-mark-more-symbols-as-public.patch \
external/liborcus/0001-these-functions-are-implemented-in-liborcus.patch \
external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
+ external/liborcus/rpath.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liborcus/rpath.patch.0 b/external/liborcus/rpath.patch.0
new file mode 100644
index 000000000000..e7a33e693db4
--- /dev/null
+++ b/external/liborcus/rpath.patch.0
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -14007,6 +14007,7 @@
+ esac
+ ;;
+ esac
++hardcode_libdir_flag_spec_CXX=
+ ;;
+
+ lynxos*)