From 70482896788d840019b7f92112b07fe0728f915c Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Fri, 24 May 2019 23:11:03 +0200 Subject: [PATCH] openfirmware: fix jamfiles Without the MultiArchDirSetup, these would not use the boot cflags, and end up being compiled position-independant. Of course, the a.out format does not allow relocations, so this could not work. Change-Id: I6bb570e545f1533200511e6881f71feedb77025b Reviewed-on: https://review.haiku-os.org/c/1481 Reviewed-by: waddlesplash --- .../platform/openfirmware/arch/ppc/Jamfile | 26 ++++++++++++------- .../platform/openfirmware/arch/sparc/Jamfile | 22 ++++++++++------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/system/boot/platform/openfirmware/arch/ppc/Jamfile b/src/system/boot/platform/openfirmware/arch/ppc/Jamfile index f7c3d95efc..14a364fb08 100644 --- a/src/system/boot/platform/openfirmware/arch/ppc/Jamfile +++ b/src/system/boot/platform/openfirmware/arch/ppc/Jamfile @@ -8,14 +8,20 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] SubDirC++Flags -fno-rtti ; -BootStaticLibrary boot_platform_openfirmware_ppc.o : - arch_mmu.cpp - arch_cpu_asm.S - arch_start_kernel.S - cpu.cpp - mmu.cpp - start.cpp -; +local platform ; +for platform in [ MultiBootSubDirSetup openfirmware ] { + on $(platform) { + + BootMergeObject boot_platform_openfirmware_ppc.o : + arch_mmu.cpp + arch_cpu_asm.S + arch_start_kernel.S + cpu.cpp + mmu.cpp + start.cpp + ; + SEARCH on [ FGristFiles arch_cpu_asm.S arch_mmu.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ; + } +} -SEARCH on [ FGristFiles arch_cpu_asm.S arch_mmu.cpp ] - = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ; diff --git a/src/system/boot/platform/openfirmware/arch/sparc/Jamfile b/src/system/boot/platform/openfirmware/arch/sparc/Jamfile index 1990ac2577..371b56060a 100644 --- a/src/system/boot/platform/openfirmware/arch/sparc/Jamfile +++ b/src/system/boot/platform/openfirmware/arch/sparc/Jamfile @@ -8,12 +8,18 @@ UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ] SubDirC++Flags -fno-rtti ; -BootMergeObject boot_platform_openfirmware_sparc.o : - arch_start_kernel.S - cpu.cpp - mmu.cpp - start.cpp -; +local platform ; +for platform in [ MultiBootSubDirSetup openfirmware ] { + on $(platform) { -SEARCH on [ FGristFiles arch_cpu_asm.S arch_mmu.cpp ] - = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ; + BootMergeObject boot_platform_openfirmware_sparc.o : + arch_start_kernel.S + cpu.cpp + mmu.cpp + start.cpp + ; + + SEARCH on [ FGristFiles arch_cpu_asm.S arch_mmu.cpp ] + = [ FDirName $(HAIKU_TOP) src system kernel arch $(TARGET_KERNEL_ARCH) ] ; + } +}