external/liborcus/ExternalProject_liborcus.mk |    4 ++++
 external/liborcus/UnpackedTarball_liborcus.mk |    1 +
 external/liborcus/rpath.patch.0               |   10 ++++++++++
 3 files changed, 15 insertions(+)

New commits:
commit 371cc81bd9ccbfbed25f810e70899c044280349e
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Wed Jun 10 11:18:23 2015 +0200

    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

diff --git a/external/liborcus/ExternalProject_liborcus.mk 
b/external/liborcus/ExternalProject_liborcus.mk
index 5c7736e..98bc45b 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 ae569ed..6cae540 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 0000000..e7a33e6
--- /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*)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to