From 182eaee962bac1c007ed02691c76151033b53fa9 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Tue, 30 Nov 2021 17:09:11 +0100 Subject: [PATCH] boot/loader/x86: select between 32-bit and 64-bit ELF support based on arch and platform Build both when building BIOS loader. Build only 32-bit ELF support for 32-bit EFI loader. Build only 64-bit ELF support for 64-bit EFI loader. Change-Id: I88bb287fbb9a4b6618b365b2d03f85f64021f499 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4818 Tested-by: Commit checker robot Reviewed-by: Adrien Destugues --- src/system/boot/loader/Jamfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/system/boot/loader/Jamfile b/src/system/boot/loader/Jamfile index 7aa6a1f7ca..a576f2c5ae 100644 --- a/src/system/boot/loader/Jamfile +++ b/src/system/boot/loader/Jamfile @@ -54,17 +54,23 @@ for platform in [ MultiBootSubDirSetup ] { { DEFINES += ALTERNATE_BOOT_ARCH=\\\"x86_64\\\" - BOOT_SUPPORT_ELF64 - BOOT_SUPPORT_PARTITION_EFI #BOOT_SUPPORT_FILE_SYSTEM_FAT ; + if $(TARGET_BOOT_PLATFORM) != efi { DEFINES += _BOOT_PLATFORM_BIOS BOOT_SUPPORT_ELF32 + BOOT_SUPPORT_ELF64 ; + } else { + if $(TARGET_ARCH) = x86_64 { + DEFINES += BOOT_SUPPORT_ELF64 ; + } else { + DEFINES += BOOT_SUPPORT_ELF32 ; + } } } case "sparc" :