gnumake2: fix various RPATH problems:

macosx.mk: ensure that executables do not get -install_name.
 linux.mk: -rpath_link seems to require an absolute path.
 executable.mk: use rpath also for executables.
 libnames.mk: add executable names (by layer), and split up PLAINLIBS/UNOLIBS.
 platform/*.mk: complete gb_LinkTarget_LAYER map.
This commit is contained in:
Michael Stahl 2010-05-11 20:17:15 +02:00
parent f9426f254b
commit dbd21fcb53
5 changed files with 83 additions and 23 deletions

View file

@ -48,7 +48,7 @@ endef
define gb_Executable__Executable_impl
$(call gb_LinkTarget_LinkTarget,$(2))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS))
$(call gb_LinkTarget_set_targettype_flags,$(2),$(gb_Executable_TARGETTYPEFLAGS) $(call gb_LinkTarget_get_rpath,$(2),$(1)))
$(call gb_Executable_get_target,$(1)) : $(call gb_LinkTarget_get_target,$(2))
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_Executable_platform,$(1),$(2))

View file

@ -25,6 +25,25 @@
#
#*************************************************************************
gb_Executable_UREBIN := \
gb_Executable_SDK := \
gb_Executable_OOO := \
gb_Executable_BRAND := \
# not installed
gb_Executable_NONE := \
mkunroll \
rscdep \
so_checksum \
sspretty \
bmp \
bmpsum \
g2g \
gb_Library_NAMESCHEMES := OOO PLAIN RT RTVER STL UNO UNOVER
gb_Library_OOOLIBS :=\
@ -62,10 +81,17 @@ gb_Library_OOOLIBS :=\
xof \
xcr \
gb_Library_PLAINLIBS :=\
icuuc \
gb_Library_PLAINLIBS_URE :=\
xml2 \
gb_Library_PLAINLIBS_OOO :=\
icuuc \
gb_Library_PLAINLIBS := \
$(gb_Library_PLAINLIBS_URE) \
$(gb_Library_PLAINLIBS_OOO) \
# => OOOLIB
gb_Library_RTLIBS :=\
comphelper \
i18nisolang1 \
@ -73,20 +99,29 @@ gb_Library_RTLIBS :=\
ucbhelper \
vos3 \
# => URELIB
gb_Library_RTVERLIBS :=\
cppuhelper \
salhelper \
# => URELIB
gb_Library_STLLIBS :=\
stl \
gb_Library_UNOLIBS :=\
gb_Library_UNOLIBS_URE := \
gb_Library_UNOLIBS_OOO := \
fsstorage \
hatchwindowfactory \
passwordcontainer \
productregistration \
vbaswobj \
gb_Library_UNOLIBS := \
$(gb_Library_UNOLIBS_URE) \
$(gb_Library_UNOLIBS_OOO) \
# => URELIB
gb_Library_UNOVERLIBS :=\
jvmfwk \
cppu \

View file

@ -168,7 +168,7 @@ $(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
endef
define gb_LinkTarget_get_rpath
-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2))) \
-Wl,-rpath-link,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2)))
-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
endef
gb_LinkTarget__RPATHS := \
@ -176,17 +176,24 @@ gb_LinkTarget__RPATHS := \
UREBIN:'$$$$ORIGIN/../lib:$$$$ORIGIN' \
OOOLIB:'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' \
BRAND:'$$$$ORIGIN:$$$$ORIGIN/../basis-link/program:$$$$ORIGIN/../basis-link/ure-link/lib' \
SDK:'$$$$ORIGIN/../../ure-link/lib' \
SDKBIN:'$$$$ORIGIN/../../ure-link/lib' \
NONEBIN:'$$$$ORIGIN/../lib:$$$$ORIGIN' \
#FIXME incomplete
gb_LinkTarget_LAYER := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_PLAINLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):) \
$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)

View file

@ -208,8 +208,11 @@ endef
define gb_LinkTarget__get_rpath_for_layer
$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget_RPATHS)))
endef
define gb_LinkTarget__get_installname
$(if $(2),-install_name '$(2)$(notdir $(1))',)
endef
define gb_LinkTarget_get_rpath
-install_name '$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2)))$(notdir $(1))'
$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_LinkTarget_get_layer,$(2))))
endef
gb_LinkTarget_RPATHS := \
@ -217,16 +220,24 @@ gb_LinkTarget_RPATHS := \
UREBIN: \
OOOLIB:@__________________________________________________OOO/ \
BRAND: \
SDK: \
SDKBIN: \
NONEBIN: \
gb_LinkTarget_LAYER := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_PLAINLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):) \
$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)

View file

@ -178,17 +178,24 @@ gb_LinkTarget__RPATHS := \
UREBIN:'$$$$ORIGIN/../lib:$$$$ORIGIN' \
OOOLIB:'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' \
BRAND:'$$$$ORIGIN:$$$$ORIGIN/../basis-link/program:$$$$ORIGIN/../basis-link/ure-link/lib' \
SDK:'$$$$ORIGIN/../../ure-link/lib' \
SDKBIN:'$$$$ORIGIN/../../ure-link/lib' \
NONEBIN:'$$$$ORIGIN/../lib:$$$$ORIGIN' \
#FIXME incomplete
gb_LinkTarget_LAYER := \
$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_PLAINLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):) \
$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
$(foreach lib,$(gb_Executable_UREBIN),$(lib):UREBIN) \
$(foreach lib,$(gb_Executable_SDK),$(lib):SDKBIN) \
$(foreach lib,$(gb_Executable_OOO),$(lib):OOOLIB) \
$(foreach lib,$(gb_Executable_BRAND),$(lib):BRAND) \
$(foreach lib,$(gb_Executable_NONE),$(lib):NONEBIN) \
gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_COMPILEROPTFLAGS)
gb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_COMPILEROPTFLAGS)