diff --git a/src/system/runtime_loader/Jamfile b/src/system/runtime_loader/Jamfile index 3a19cf1372..71a80b2215 100644 --- a/src/system/runtime_loader/Jamfile +++ b/src/system/runtime_loader/Jamfile @@ -1,109 +1,119 @@ SubDir HAIKU_TOP src system runtime_loader ; -local architecture = $(TARGET_PACKAGING_ARCH) ; -UsePrivateHeaders libroot runtime_loader shared ; -UsePrivateHeaders kernel ; - # for -UsePrivateHeaders libroot os ; - # for "PathBuffer.h" -UsePrivateSystemHeaders ; +local architectureObject ; +for architectureObject in [ MultiArchSubDirSetup ] { + on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; -ObjectHdrs find_directory.cpp : $(HAIKU_TOP)/src/system/libroot/os ; + UsePrivateHeaders libroot runtime_loader shared ; + UsePrivateHeaders kernel ; + # for + UsePrivateHeaders libroot os ; + # for "PathBuffer.h" + UsePrivateSystemHeaders ; -# 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 ; + ObjectHdrs find_directory.cpp : $(HAIKU_TOP)/src/system/libroot/os ; -DEFINES += - KMESSAGE_CONTAINER_ONLY - _LOADER_MODE - USING_LIBGCC=1 -; + # 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 ; -AddResources runtime_loader : runtime_loader.rdef ; + DEFINES += + KMESSAGE_CONTAINER_ONLY + _LOADER_MODE + USING_LIBGCC=1 + ; -# needed for "runtime_loader" only -StaticLibrary libruntime_loader.a : - kernel_vsprintf.cpp - kernel_cpp.cpp - KMessage.cpp - find_directory.cpp - : - mutex.o - recursive_lock.o - syscalls.o - sem.o - tls.o + AddResources [ MultiArchDefaultGristFiles runtime_loader ] + : runtime_loader.rdef ; - errno.o - fcntl.o + # needed for "runtime_loader" only + StaticLibrary <$(architecture)>libruntime_loader.a : + kernel_vsprintf.cpp + kernel_cpp.cpp + KMessage.cpp + find_directory.cpp + : + mutex.o + recursive_lock.o + syscalls.o + sem.o + tls.o - ctype.o - LocaleData.o + errno.o + fcntl.o - memchr.o - memcmp.o - memmove.o - strcasecmp.o - strcat.o - strchr.o - strcmp.o - strcpy.o - strcspn.o - strdup.o - strerror.o - strlcat.o - strlcpy.o - strlen.o - strncmp.o - strnlen.o - strpbrk.o - strrchr.o - strspn.o - strstr.o + ctype.o + LocaleData.o - [ FGristFiles kernel_vsprintf.o ] -; + memchr.o + memcmp.o + memmove.o + strcasecmp.o + strcat.o + strchr.o + strcmp.o + strcpy.o + strcspn.o + strdup.o + strerror.o + strlcat.o + strlcpy.o + strlen.o + strncmp.o + strnlen.o + strpbrk.o + strrchr.o + strspn.o + strstr.o + ; -SEARCH on [ FGristFiles kernel_cpp.cpp ] - = [ FDirName $(HAIKU_TOP) src system kernel util ] ; -SEARCH on [ FGristFiles kernel_vsprintf.cpp ] - = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; -SEARCH on [ FGristFiles KMessage.cpp ] - = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; -SEARCH on [ FGristFiles find_directory.cpp ] - = [ FDirName $(HAIKU_TOP) src system libroot os ] ; + SEARCH on [ FGristFiles kernel_cpp.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel util ] ; + SEARCH on [ FGristFiles kernel_vsprintf.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel lib ] ; + SEARCH on [ FGristFiles KMessage.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel messaging ] ; + SEARCH on [ FGristFiles find_directory.cpp ] + = [ FDirName $(HAIKU_TOP) src system libroot os ] ; -local sources = - add_ons.cpp - elf.cpp - elf_haiku_version.cpp - elf_load_image.cpp - elf_symbol_lookup.cpp - elf_tls.cpp - elf_versioning.cpp - pe.cpp - errors.cpp - export.cpp - heap.cpp - images.cpp - runtime_loader.cpp - utility.cpp -; + local sources = + add_ons.cpp + elf.cpp + elf_haiku_version.cpp + elf_load_image.cpp + elf_symbol_lookup.cpp + elf_tls.cpp + elf_versioning.cpp + pe.cpp + errors.cpp + export.cpp + heap.cpp + images.cpp + runtime_loader.cpp + utility.cpp + ; -Objects $(sources) ; + Objects $(sources) ; -Ld runtime_loader : - [ FGristFiles $(sources:S=$(SUFOBJ)) ] - libruntime_loader.a - libruntime_loader_$(TARGET_ARCH).a - [ TargetKernelLibsupc++ ] - [ TargetKernelLibgcc ] - [ TargetKernelLibgcceh ] - : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/runtime_loader.ld - : --no-undefined -shared -soname=runtime_loader -; + Ld [ MultiArchDefaultGristFiles runtime_loader ] : + [ FGristFiles $(sources:S=$(SUFOBJ)) ] + <$(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) ; diff --git a/src/system/runtime_loader/arch/arm/Jamfile b/src/system/runtime_loader/arch/arm/Jamfile index 86d9d2b648..2533a32e49 100644 --- a/src/system/runtime_loader/arch/arm/Jamfile +++ b/src/system/runtime_loader/arch/arm/Jamfile @@ -1,17 +1,22 @@ 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 : - arch_relocate.cpp - : - thread.o + StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.cpp + : + thread.o - arch_string.o - memset.o - ; + arch_string.o + memset.o + ; + } +} diff --git a/src/system/runtime_loader/arch/m68k/Jamfile b/src/system/runtime_loader/arch/m68k/Jamfile index a47443abe3..1dc43f5c38 100644 --- a/src/system/runtime_loader/arch/m68k/Jamfile +++ b/src/system/runtime_loader/arch/m68k/Jamfile @@ -1,18 +1,24 @@ 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 : - arch_relocate.cpp - : - atomic.o - thread.o + StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.cpp + : + atomic.o + thread.o + + arch_string.o + memset.o + ; + } +} - arch_string.o - memset.o - ; diff --git a/src/system/runtime_loader/arch/ppc/Jamfile b/src/system/runtime_loader/arch/ppc/Jamfile index 0010afde37..6bc521b45e 100644 --- a/src/system/runtime_loader/arch/ppc/Jamfile +++ b/src/system/runtime_loader/arch/ppc/Jamfile @@ -1,18 +1,23 @@ 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 : - arch_relocate.cpp - : - atomic.o - thread.o + StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.cpp + : + atomic.o + thread.o - memcpy.o - memset.o - ; + memcpy.o + memset.o + ; + } +} diff --git a/src/system/runtime_loader/arch/x86/Jamfile b/src/system/runtime_loader/arch/x86/Jamfile index 9b59368cc5..444c3211b0 100644 --- a/src/system/runtime_loader/arch/x86/Jamfile +++ b/src/system/runtime_loader/arch/x86/Jamfile @@ -1,17 +1,22 @@ 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 : - arch_relocate.cpp - : - atomic.o - thread.o + StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.cpp + : + atomic.o + thread.o - arch_string.o - ; + arch_string.o + ; + } +} diff --git a/src/system/runtime_loader/arch/x86_64/Jamfile b/src/system/runtime_loader/arch/x86_64/Jamfile index 42e72d4b75..009713d953 100644 --- a/src/system/runtime_loader/arch/x86_64/Jamfile +++ b/src/system/runtime_loader/arch/x86_64/Jamfile @@ -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 : - arch_relocate.cpp - : - thread.o - arch_string.o - ; + StaticLibrary <$(architecture)>libruntime_loader_$(TARGET_ARCH).a : + arch_relocate.cpp + : + thread.o + arch_string.o + ; + } +}