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
+41 -31
View File
@@ -1,31 +1,36 @@
SubDir HAIKU_TOP src system runtime_loader ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders libroot runtime_loader shared ;
UsePrivateHeaders kernel ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders libroot runtime_loader shared ;
UsePrivateHeaders kernel ;
# for <util/KMessage.h>
UsePrivateHeaders libroot os ;
UsePrivateHeaders libroot os ;
# for "PathBuffer.h"
UsePrivateSystemHeaders ;
UsePrivateSystemHeaders ;
ObjectHdrs find_directory.cpp : $(HAIKU_TOP)/src/system/libroot/os ;
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.
SubDirCcFlags -fno-builtin ;
SubDirC++Flags -fno-builtin -fno-exceptions ;
# 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 ;
DEFINES +=
DEFINES +=
KMESSAGE_CONTAINER_ONLY
_LOADER_MODE
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 :
# needed for "runtime_loader" only
StaticLibrary <$(architecture)>libruntime_loader.a :
kernel_vsprintf.cpp
kernel_cpp.cpp
KMessage.cpp
@@ -56,27 +61,25 @@ 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 ]
SEARCH on [ FGristFiles kernel_cpp.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles kernel_vsprintf.cpp ]
SEARCH on [ FGristFiles kernel_vsprintf.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel lib ] ;
SEARCH on [ FGristFiles KMessage.cpp ]
SEARCH on [ FGristFiles KMessage.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;
SEARCH on [ FGristFiles find_directory.cpp ]
SEARCH on [ FGristFiles find_directory.cpp ]
= [ FDirName $(HAIKU_TOP) src system libroot os ] ;
local sources =
local sources =
add_ons.cpp
elf.cpp
elf_haiku_version.cpp
@@ -91,19 +94,26 @@ local sources =
images.cpp
runtime_loader.cpp
utility.cpp
;
;
Objects $(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) ;
+10 -5
View File
@@ -1,13 +1,16 @@
SubDir HAIKU_TOP src system runtime_loader arch arm ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup arm ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
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
;
}
}
+11 -5
View File
@@ -1,13 +1,16 @@
SubDir HAIKU_TOP src system runtime_loader arch m68k ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup m68k ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
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
;
}
}
+10 -5
View File
@@ -1,13 +1,16 @@
SubDir HAIKU_TOP src system runtime_loader arch ppc ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ppc ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
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
;
}
}
+10 -5
View File
@@ -1,13 +1,16 @@
SubDir HAIKU_TOP src system runtime_loader arch x86 ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
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
;
}
}
+10 -5
View File
@@ -1,15 +1,20 @@
SubDir HAIKU_TOP src system runtime_loader arch x86_64 ;
local architecture = $(TARGET_PACKAGING_ARCH) ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup x86_64 ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
UsePrivateHeaders runtime_loader ;
UsePrivateSystemHeaders ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) $(DOTDOT) ] ;
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
;
}
}