Patch by Samuel Rodriguez Perez, slightly modified by myself: New

configure flag "--use-32bit" enabling 32 bit builds with a 64 bit host
compiler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22046 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2007-08-22 22:07:03 +00:00
parent 2652981136
commit 0385b0657b
3 changed files with 49 additions and 31 deletions
+19 -17
View File
@@ -2,7 +2,7 @@
rule AddSharedObjectGlueCode
{
# AddSharedObjectGlueCode <target> : <isExecutable> ;
# we link with -nostdlib and add the required libs manually, when building
# for Haiku
local platform ;
@@ -94,7 +94,7 @@ rule Preference
rule Server
{
# Server <name> : <sources> : <libraries> : <res> ;
Executable $(1) : $(2) : $(3) : $(4) ;
}
@@ -141,7 +141,7 @@ rule StaticLibrary
# <lib>: The static library to be built.
# <sources>: List of source files.
# <otherObjects>: List of additional object files.
#
#
local lib = $(1) ;
local sources = [ FGristFiles $(2) ] ;
local otherObjects = $(3) ;
@@ -192,12 +192,12 @@ rule Ld
NEEDLIBS on $(target) = $(NEEDLIBS) ;
LINKLIBS on $(target) = $(LINKLIBS) ;
}
LocalClean clean : $(target) ;
LocalDepends all : $(target) ;
Depends $(target) : $(objects) ;
MakeLocateDebug $(target) ;
MakeLocateDebug $(target) ;
}
actions Ld
@@ -224,8 +224,10 @@ rule MergeObjectFromObjects
if $(PLATFORM) = host {
LINK on $(1) = $(HOST_LD) ;
LINKFLAGS on $(target) = $(HOST_LDFLAGS) ;
} else {
LINK on $(1) = $(TARGET_LD) ;
LINKFLAGS on $(target) = $(TARGET_LDFLAGS) ;
}
}
@@ -238,7 +240,7 @@ rule MergeObjectFromObjects
actions MergeObjectFromObjects1
{
$(LINK) -r $(2) -o $(1) ;
$(LINK) $(LINKFLAGS) -r $(2) -o $(1) ;
}
rule MergeObject
@@ -362,7 +364,7 @@ rule LinkAgainst
linkLibs += $(i) ;
}
}
NEEDLIBS on $(1) = $(NEEDLIBS) $(needLibs) ;
LINKLIBS on $(1) = $(LINKLIBS) -l$(linkLibs) ;
@@ -403,10 +405,10 @@ rule BuildPlatformObjects
{
# Usage BuildPlatformObjects <sources> ;
# <sources> The sources.
#
#
local sources = [ FGristFiles $(1) ] ;
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
PLATFORM on $(objects) = host ;
SUPPORTED_PLATFORMS on $(objects) = host ;
@@ -419,7 +421,7 @@ rule BuildPlatformMain
# <target> The executable/library.
# <sources> The sources.
# <libraries> Libraries to link against.
#
#
local target = $(1) ;
local sources = $(2) ;
local libs = $(3) ;
@@ -440,7 +442,7 @@ rule BuildPlatformMain
NEEDLIBS on $(target) += $(HOST_LIBROOT) ;
}
}
Main $(target) : $(sources) ;
LinkAgainst $(target) : $(libs) ;
}
@@ -455,7 +457,7 @@ rule BuildPlatformSharedLibrary
local target = $(1) ;
local sources = $(2) ;
local libs = $(3) ;
BuildPlatformMain $(target) : $(sources) : $(libs) ;
if $(HOST_PLATFORM) = darwin {
@@ -467,8 +469,8 @@ rule BuildPlatformSharedLibrary
}
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
CCFLAGS on $(objects) += $(HOST_PIC_CCFLAGS) ;
C++FLAGS on $(objects) += $(HOST_PIC_C++FLAGS) ;
CCFLAGS on $(objects) += $(HOST_PIC_CCFLAGS) ;
C++FLAGS on $(objects) += $(HOST_PIC_C++FLAGS) ;
}
rule BuildPlatformMergeObject
@@ -484,7 +486,7 @@ rule BuildPlatformMergeObject
local sources = $(2) ;
local otherObjects = $(3) ;
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
PLATFORM on $(target) = host ;
SUPPORTED_PLATFORMS on $(target) = host ;
@@ -520,11 +522,11 @@ rule BuildPlatformStaticLibrary
# Creates a static library from sources.
# <lib>: The library.
# <sources>: List of source files.
local lib = $(1) ;
local sources = $(2) ;
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
PLATFORM on $(lib) = host ;
SUPPORTED_PLATFORMS on $(lib) = host ;