* When using the generic attribute emulation the Link actions does now

first remove the target and its attributes (if any). Before gcc would
  just unlink it and leak the attributes, which could lead to later
  mixups, if the file's inode ID was re-used. As reported by Rene this
  improves the attribute mixup situation, but doesn't solve it
  completely. So that status quo is still the same: When using the
  generic attribute emulation one has to build from the scratch to be
  sure all attributes are fine.
* Got rid of superfluous whitespace.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27385 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-09-08 23:03:52 +00:00
parent 2982ae5d1a
commit bfdf82d450
+16 -1
View File
@@ -46,9 +46,24 @@ rule Link
Chmod $(<) ;
}
# When using "real" attributes (i.e. BeOS attributes or xattr/extattr) on the
# host platform, unlinking the main target by gcc will also automatically get
# rid of the attributes. When using the generic attribute emulation, which
# 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
{
$(LINK) $(LINKFLAGS) -o "$(1)" $(UNDEFS) "$(LINK_BEGIN_GLUE)" "$(2)" "$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" ;
$(LINK) $(LINKFLAGS) -o "$(1)" $(UNDEFS) "$(LINK_BEGIN_GLUE)" "$(2)" \
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" ;
}
} else {
actions Link bind NEEDLIBS LINK_BEGIN_GLUE LINK_END_GLUE
{
$(RM) "$(1)"
$(LINK) $(LINKFLAGS) -o "$(1)" $(UNDEFS) "$(LINK_BEGIN_GLUE)" "$(2)" \
"$(NEEDLIBS)" $(LINKLIBS) "$(LINK_END_GLUE)" ;
}
}
rule Object