[Libreoffice-commits] .: solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 2 08:46:29 PDT 2012


 solenv/gbuild/platform/solaris.mk |   10 +++++++---
 solenv/gbuild/platform/unxgcc.mk  |    9 ++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit e2dcbf5e1791badab39361782057005681866e5d
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Tue Oct 2 17:41:01 2012 +0200

    don't use empty rpath
    
    Besides the usual problem this causes with rpath (security), clang
    also doesn't like empty arguments in -Wl.
    
    Change-Id: I5c0896ae06ffcf6d2a268bf98a2b3f031cb8a70f

diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 47c12d2..6c0bded 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -301,12 +301,16 @@ gb_Executable_LAYER := \
 	$(foreach exe,$(gb_Executable_NONE),$(exe):NONE) \
 
 
-define gb_Executable_get_rpath
-'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \
--L$(gb_Library_OUTDIRLOCATION)
+define gb_Executable__get_rpath
+$(strip $(if $(1),'-Wl$(COMMA)-rpath$(COMMA)$(1)') \
+-L$(gb_Library_OUTDIRLOCATION))
 #JAD#-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
 endef
 
+define gb_Executable_get_rpath
+$(call gb_Executable__get_rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))))
+endef
+
 define gb_Executable_Executable_platform
 $(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1))
 
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index d996bd4..73a354c 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -262,7 +262,7 @@ gb_Library_LAYER := \
 	$(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \
 
 define gb_Library__get_rpath
-$(if $(1),$(strip -Wl,-z,origin '-Wl,-rpath,$(1)' '-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)'))
+$(if $(1),$(strip -Wl,-z,origin '-Wl,-rpath,$(1)' -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)))
 endef
 
 define gb_Library_get_rpath
@@ -299,9 +299,12 @@ gb_Executable_LAYER := \
 	$(foreach exe,$(gb_Executable_NONE),$(exe):NONE) \
 
 
+define gb_Executable__get_rpath
+$(strip -Wl,-z,origin $(if $(1),'-Wl$(COMMA)-rpath$(COMMA)$(1)') -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION))
+endef
+
 define gb_Executable_get_rpath
--Wl,-z,origin '-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \
--Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
+$(call gb_Executable__get_rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))))
 endef
 
 define gb_Executable_Executable_platform


More information about the Libreoffice-commits mailing list