Added rule SetVersionScript to set the version script for a target and adjusted
the Link and KernelLd rules to support it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30825 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
79182ad1e5
commit
297827477b
@ -66,9 +66,10 @@ rule KernelLd
|
||||
}
|
||||
}
|
||||
|
||||
actions KernelLd
|
||||
actions KernelLd bind VERSION_SCRIPT
|
||||
{
|
||||
$(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) ;
|
||||
$(LINK) $(LINKFLAGS) -o "$(1)" "$(2)" $(LINKLIBS) \
|
||||
--version-script=$(VERSION_SCRIPT)
|
||||
}
|
||||
|
||||
rule KernelAddon
|
||||
|
@ -536,6 +536,21 @@ rule AddResources
|
||||
}
|
||||
}
|
||||
|
||||
rule SetVersionScript target : versionScript
|
||||
{
|
||||
# SetVersionScript <target> : <versionScript>
|
||||
#
|
||||
# Sets the version script for <target>. Grist will be added to
|
||||
# <versionScript> and SEARCH will be set on it.
|
||||
|
||||
versionScript = [ FGristFiles $(versionScript) ] ;
|
||||
|
||||
SEARCH on $(versionScript) += $(SEARCH_SOURCE) ;
|
||||
|
||||
VERSION_SCRIPT on $(target) = $(versionScript) ;
|
||||
Depends $(target) : $(versionScript) ;
|
||||
}
|
||||
|
||||
rule BuildPlatformObjects
|
||||
{
|
||||
# Usage BuildPlatformObjects <sources> ;
|
||||
|
@ -52,17 +52,19 @@ rule Link
|
||||
# uses separate files, we need to remove the target explicitely first, so that
|
||||
# the attributes won't be "leaked".
|
||||
if $(HOST_PLATFORM_BEOS_COMPATIBLE) || $(HAIKU_HOST_USE_XATTR) = 1 {
|
||||
actions Link bind NEEDLIBS LINK_BEGIN_GLUE LINK_END_GLUE
|
||||
actions Link bind NEEDLIBS LINK_BEGIN_GLUE LINK_END_GLUE VERSION_SCRIPT
|
||||
{
|
||||
$(LINK) $(LINKFLAGS) -o "$(1)" $(UNDEFS) "$(LINK_BEGIN_GLUE)" "$(2)" \
|
||||
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" ;
|
||||
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" \
|
||||
-Wl,--version-script,$(VERSION_SCRIPT)
|
||||
}
|
||||
} else {
|
||||
actions Link bind NEEDLIBS LINK_BEGIN_GLUE LINK_END_GLUE
|
||||
actions Link bind NEEDLIBS LINK_BEGIN_GLUE LINK_END_GLUE VERSION_SCRIPT
|
||||
{
|
||||
$(RM) "$(1)"
|
||||
$(LINK) $(LINKFLAGS) -o "$(1)" $(UNDEFS) "$(LINK_BEGIN_GLUE)" "$(2)" \
|
||||
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" ;
|
||||
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" \
|
||||
-Wl,--version-script,$(VERSION_SCRIPT)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user