Kaydet (Commit) 371cc81b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

external/liborcus: Fix Linux RPATH

This has become necessary after edb38d70 "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
üst c6dab8e7
......@@ -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)') \
......
......@@ -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:
--- configure
+++ configure
@@ -14007,6 +14007,7 @@
esac
;;
esac
+hardcode_libdir_flag_spec_CXX=
;;
lynxos*)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment