runtime_loader: add hybrid support.

This commit is contained in:
Jérôme Duval
2018-02-25 08:29:51 +01:00
parent befa252fbf
commit 4bd0c1066b
6 changed files with 184 additions and 148 deletions
+21 -11
View File
@@ -1,5 +1,9 @@
SubDir HAIKU_TOP src system runtime_loader ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders libroot runtime_loader shared ;
@@ -11,8 +15,8 @@ UsePrivateSystemHeaders ;
ObjectHdrs find_directory.cpp : $(HAIKU_TOP)/src/system/libroot/os ;
# Don't let gcc inject built-in function code. This will cause dependencies
# to libroot, which we don't link against.
# Don't let gcc inject built-in function code. This will cause
# dependencies to libroot, which we don't link against.
SubDirCcFlags -fno-builtin ;
SubDirC++Flags -fno-builtin -fno-exceptions ;
@@ -22,10 +26,11 @@ DEFINES +=
USING_LIBGCC=1
;
AddResources runtime_loader : runtime_loader.rdef ;
AddResources [ MultiArchDefaultGristFiles runtime_loader ]
: runtime_loader.rdef ;
# needed for "runtime_loader" only
StaticLibrary libruntime_loader.a :
StaticLibrary <$(architecture)>libruntime_loader.a :
kernel_vsprintf.cpp
kernel_cpp.cpp
KMessage.cpp
@@ -56,15 +61,13 @@ StaticLibrary libruntime_loader.a :
<src!system!libroot!posix!string!$(architecture)>strerror.o
<src!system!libroot!posix!string!$(architecture)>strlcat.o
<src!system!libroot!posix!string!$(architecture)>strlcpy.o
<src!system!kernel!lib>strlen.o
<src!system!libroot!posix!string!$(architecture)>strlen.o
<src!system!libroot!posix!string!$(architecture)>strncmp.o
<src!system!libroot!posix!string!$(architecture)>strnlen.o
<src!system!libroot!posix!string!$(architecture)>strpbrk.o
<src!system!libroot!posix!string!$(architecture)>strrchr.o
<src!system!libroot!posix!string!$(architecture)>strspn.o
<src!system!libroot!posix!string!$(architecture)>strstr.o
[ FGristFiles kernel_vsprintf.o ]
;
SEARCH on [ FGristFiles kernel_cpp.cpp ]
@@ -95,15 +98,22 @@ local sources =
Objects $(sources) ;
Ld runtime_loader :
Ld [ MultiArchDefaultGristFiles runtime_loader ] :
[ FGristFiles $(sources:S=$(SUFOBJ)) ]
libruntime_loader.a
libruntime_loader_$(TARGET_ARCH).a
<$(architecture)>libruntime_loader.a
<$(architecture)>libruntime_loader_$(TARGET_ARCH).a
[ TargetKernelLibsupc++ ]
[ TargetKernelLibgcc ]
[ TargetKernelLibgcceh ]
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld
: --no-undefined -shared -soname=runtime_loader
;
}
}
local arch ;
for arch in $(TARGET_ARCHS) {
HaikuSubInclude arch $(arch) ;
}
HaikuSubInclude arch $(TARGET_ARCH) ;
+6 -1
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src system runtime_loader arch arm ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup arm ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
@@ -7,7 +10,7 @@ UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>thread.o
@@ -15,3 +18,5 @@ StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>arch_string.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memset.o
;
}
}
+7 -1
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src system runtime_loader arch m68k ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup m68k ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
@@ -7,7 +10,7 @@ UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>atomic.o
@@ -16,3 +19,6 @@ StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>arch_string.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memset.o
;
}
}
+6 -1
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src system runtime_loader arch ppc ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ppc ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
@@ -7,7 +10,7 @@ UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>atomic.o
@@ -16,3 +19,5 @@ StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memcpy.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>memset.o
;
}
}
+6 -1
View File
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src system runtime_loader arch x86 ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
@@ -7,7 +10,7 @@ UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>atomic.o
@@ -15,3 +18,5 @@ StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>arch_string.o
;
}
}
@@ -1,5 +1,8 @@
SubDir HAIKU_TOP src system runtime_loader arch x86_64 ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup x86_64 ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
@@ -7,9 +10,11 @@ UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
StaticLibrary libruntime_loader_$(TARGET_ARCH).a :
StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a :
arch_relocate.cpp
:
<src!system!libroot!os!arch!$(TARGET_ARCH)!$(architecture)>thread.o
<src!system!libroot!posix!string!arch!$(TARGET_ARCH)!$(architecture)>arch_string.o
;
}
}