From ac690cf14892a9da7a1123a9b748b076a7e5dbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Wed, 31 Jan 2018 21:42:51 +0100 Subject: [PATCH] glue: correctly support different architectures. * use MergeObject even if we don't need the merged object: the rule does what is needed and is standardly used for instance in libroot.so. * add a grist to source files for the bootstrap glue. --- src/system/glue/Jamfile | 6 ++++-- src/system/glue/arch/arm/Jamfile | 6 ++++-- src/system/glue/arch/m68k/Jamfile | 6 ++++-- src/system/glue/arch/ppc/Jamfile | 6 ++++-- src/system/glue/arch/x86/Jamfile | 6 ++++-- src/system/glue/arch/x86_64/Jamfile | 6 ++++-- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/system/glue/Jamfile b/src/system/glue/Jamfile index 82417d035e..e04e051723 100644 --- a/src/system/glue/Jamfile +++ b/src/system/glue/Jamfile @@ -3,6 +3,8 @@ SubDir HAIKU_TOP src system glue ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = @@ -10,11 +12,11 @@ for architectureObject in [ MultiArchSubDirSetup ] { start_dyn.c haiku_version_glue.c ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_common.o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } } diff --git a/src/system/glue/arch/arm/Jamfile b/src/system/glue/arch/arm/Jamfile index a61616e9b0..a2e337a23e 100644 --- a/src/system/glue/arch/arm/Jamfile +++ b/src/system/glue/arch/arm/Jamfile @@ -3,17 +3,19 @@ SubDir HAIKU_TOP src system glue arch arm ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup arm ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = crti.S crtn.S ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } } diff --git a/src/system/glue/arch/m68k/Jamfile b/src/system/glue/arch/m68k/Jamfile index 8cc2f1214b..d931da082a 100644 --- a/src/system/glue/arch/m68k/Jamfile +++ b/src/system/glue/arch/m68k/Jamfile @@ -3,17 +3,19 @@ SubDir HAIKU_TOP src system glue arch m68k ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup m68k ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = crti.S crtn.S ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } } diff --git a/src/system/glue/arch/ppc/Jamfile b/src/system/glue/arch/ppc/Jamfile index decff45667..10045f9bb0 100644 --- a/src/system/glue/arch/ppc/Jamfile +++ b/src/system/glue/arch/ppc/Jamfile @@ -3,17 +3,19 @@ SubDir HAIKU_TOP src system glue arch ppc ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup ppc ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = crti.S crtn.S ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } } diff --git a/src/system/glue/arch/x86/Jamfile b/src/system/glue/arch/x86/Jamfile index b87bae5ad3..1e7a35e232 100644 --- a/src/system/glue/arch/x86/Jamfile +++ b/src/system/glue/arch/x86/Jamfile @@ -3,17 +3,19 @@ SubDir HAIKU_TOP src system glue arch x86 ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = crti.S crtn.S ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } } diff --git a/src/system/glue/arch/x86_64/Jamfile b/src/system/glue/arch/x86_64/Jamfile index c7111051c9..bd6cdb8622 100644 --- a/src/system/glue/arch/x86_64/Jamfile +++ b/src/system/glue/arch/x86_64/Jamfile @@ -3,17 +3,19 @@ SubDir HAIKU_TOP src system glue arch x86_64 ; local architectureObject ; for architectureObject in [ MultiArchSubDirSetup x86_64 ] { on $(architectureObject) { + local architecture = $(TARGET_PACKAGING_ARCH) ; + UsePrivateSystemHeaders ; local sources = crti.S crtn.S ; - Objects $(sources) ; + MergeObject <$(architecture)>glue_arch_$(TARGET_ARCH).o : $(sources) ; if $(HAIKU_BUILD_TYPE) = bootstrap { # build a version for stage0 of the bootstrap process - BootstrapStage0PlatformObjects $(sources) : true ; + BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ; } } }