summaryrefslogtreecommitdiff
path: root/external/libmwaw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-12 14:38:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-12 14:59:40 +0200
commit1d028d4783da69c5c0e6e0b59e0f8ac55eb9d2b1 (patch)
treec4cc2d4e37be6eca68b9829258176e156b993f93 /external/libmwaw
parent688995bbb296e875511403fcce9276183f2545b0 (diff)
Fix Linux RPATH of various external modules
...as discussed in 371cc81bd9ccbfbed25f810e70899c044280349e "external/liborcus: Fix Linux RPATH:" * When an external module produces multiple libraries (that we all install) that depend on each other, they need to contain $ORIGIN in RPATH (strictly speaking, those that do not depend on any other libraries from the module would not need that, but it is harmless and easier to do that way). * When an external module's libraries depend on other external modules' libraries, and (at least some of) those other external modules are not configuread as --with-system-*, they need to contain $ORIGIN in RPATH (again, for simplicity, some libraries may get that even if they would not strictly need it). * Try to outsmart the external modules' libtool instances to not add (ultimately bogus) paths to RPATH for dependencies on libraries from external modules (either from the same module, or from anohter module not configured as --with-system-*). The only time we do not outsmart libtool, and instead rely on it (hopefully?) doing the right thing is when a given external modules' libraries depend on libraries from excatly one other external module, and the latter is configured as --with-system-*. * That outsmarting means that if an external library depends both on external libraries provided by modules not configured as --with-system-* (so RPATH contains $ORIGIN, and the outsmarting is not suppressed) and on external libraries provided by modules configured as --with-system-*: Then if the latter are in unusual locations on the system that would require an RPATH entry (which might be provided via the corresponding "pkg-config --libs", say, and presumably would be honoured by libtool if we did not outsmart it), then those paths are now erroneously missing from RPATH. * That outsmarting also causes linking of some utility applications in module redland to fail, but those are ultimately unused, so cut them off by patching their respective sub-directory Makefile.in. Change-Id: Iec05b3568fbcf04987018322c328b769ae4f5dab
Diffstat (limited to 'external/libmwaw')
-rw-r--r--external/libmwaw/ExternalProject_libmwaw.mk3
-rw-r--r--external/libmwaw/UnpackedTarball_libmwaw.mk6
-rw-r--r--external/libmwaw/rpath.patch10
3 files changed, 19 insertions, 0 deletions
diff --git a/external/libmwaw/ExternalProject_libmwaw.mk b/external/libmwaw/ExternalProject_libmwaw.mk
index 75c926086701..d1f05d328afd 100644
--- a/external/libmwaw/ExternalProject_libmwaw.mk
+++ b/external/libmwaw/ExternalProject_libmwaw.mk
@@ -39,6 +39,9 @@ $(call gb_ExternalProject_get_state_target,libmwaw,build) :
CXXFLAGS="$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS),\
$(if $(COM_GCC_IS_CLANG),-Qunused-arguments) \
-I$(call gb_UnpackedTarball_get_dir,boost))" \
+ $(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \
+ 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
+ -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
&& (cd $(EXTERNAL_WORKDIR)/src/lib && \
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk
index 26492dff1f1d..4ba779ae44bd 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -21,4 +21,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
endif
endif
+ifeq ($(SYSTEM_REVENGE),)
+$(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
+ external/libmwaw/rpath.patch \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libmwaw/rpath.patch b/external/libmwaw/rpath.patch
new file mode 100644
index 000000000000..a73d8ae223f9
--- /dev/null
+++ b/external/libmwaw/rpath.patch
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -15353,6 +15353,7 @@
+ esac
+ ;;
+ esac
++hardcode_libdir_flag_spec_CXX=
+ ;;
+
+ lynxos*)