some make system work to get x86-64 linux compiles working:
-The biggest problem with linking host libraries (libbe_build and libroot_build) was not having the source files compiled with the -fPIC flag. As far as I can tell, we want to do this on all of the other host platforms as well, so hacked the jam files a bit to add it. Forgive me if I've committed more Jamfile sins. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21423 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -465,6 +465,10 @@ rule BuildPlatformSharedLibrary
|
||||
LINKFLAGS on $(target) = [ on $(target) return $(LINKFLAGS) ]
|
||||
-shared -Xlinker -soname=\"$(target:G=)\" ;
|
||||
}
|
||||
|
||||
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
||||
CCFLAGS on $(objects) += $(HOST_PIC_CCFLAGS) ;
|
||||
C++FLAGS on $(objects) += $(HOST_PIC_C++FLAGS) ;
|
||||
}
|
||||
|
||||
rule BuildPlatformMergeObject
|
||||
@@ -489,10 +493,32 @@ rule BuildPlatformMergeObject
|
||||
# propagate the flag to the objects
|
||||
USES_BE_API on $(objects) = $(usesBeAPI) ;
|
||||
}
|
||||
|
||||
|
||||
MergeObject $(target) : $(sources) : $(otherObjects) ;
|
||||
}
|
||||
|
||||
rule BuildPlatformMergeObjectPIC
|
||||
{
|
||||
# BuildPlatformMergeObjectPIC <name> : <sources> : <other objects> ;
|
||||
# Compiles source files and merges the object files to an object file.
|
||||
# Same as BuildPlatformMergeObject rule but adds position-independent
|
||||
# flags to the compiler (if any).
|
||||
# <name>: Name of the object file to create. No grist will be added.
|
||||
# <sources>: Sources to be compiled. Grist will be added.
|
||||
# <other objects>: Object files or static libraries to be merged. No grist
|
||||
# will be added.
|
||||
#
|
||||
local target = $(1) ;
|
||||
local sources = $(2) ;
|
||||
local otherObjects = $(3) ;
|
||||
|
||||
local objects = [ FGristFiles $(sources:S=$(SUFOBJ)) ] ;
|
||||
CCFLAGS on $(objects) += $(HOST_PIC_CCFLAGS) ;
|
||||
C++FLAGS on $(objects) += $(HOST_PIC_C++FLAGS) ;
|
||||
|
||||
BuildPlatformMergeObject $(target) : $(sources) : $(otherObjects) ;
|
||||
}
|
||||
|
||||
rule BuildPlatformStaticLibrary
|
||||
{
|
||||
# BuildPlatformStaticLibrary <lib> : <sources> ;
|
||||
|
||||
Reference in New Issue
Block a user