Skip to contentSkip to conversation

Disable systemd-boot from building with x32 IA Machine

PATCH New Saul Wold 1 participant 4 messages Sep 26, 2017

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

v2 cover Disable systemd-boot from building with x32 IA Machine

systemd-boot has to be build for the native IA instruction set size, this patch series is needed to disable it from building or being depended on by WIC when building x32 as DEFAULTTUNE and not just as multilib.

V2: fixed x86_x32 to be x86-32 and made it consistent.

Sau!

Saul Wold (3):
arch-x86: Add x86-x32 to MACHINEOVERRIDES
wic: remove systemd-boot for x32
systemd-boot: Should not build x32

 meta/classes/image_types_wic.bbclass          | 1 +
 meta/conf/machine/include/x86/arch-x86.inc    | 1 +
 meta/recipes-core/meta/wic-tools.bb           | 1 +
 meta/recipes-core/systemd/systemd-boot_234.bb | 1 +
 4 files changed, 4 insertions(+)
Signature · 1 line
2.11.0
author
#1 lore raw

PATCH v2 1/3 arch-x86: Add x86-x32 to MACHINEOVERRIDES

This is needed as an x32 more generic x32 override later in the OVERRIDES, currently linux-gnux32 is the first override, but we need a stronger (later in the list) x32 override to deal with some needed x32 dependency overrides.

---
 meta/conf/machine/include/x86/arch-x86.inc | 1 +
 1 file changed, 1 insertion(+)
meta/conf/machine/include/x86/arch-x86.inc +1 -0
index e51d595f74..31d30b3304 100644
@@ -26,6 +26,7 @@ TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64',
 TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
 # user mode qemu doesn't support x32
 MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '' ,d)}"
 
 # ELF64 ABI
 TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
Signature · 1 line
2.11.0
author
#2 lore raw

PATCH v2 2/3 wic: remove systemd-boot for x32

In reply to Saul Wold

Currently systemd-boot actually incorporates libgcc, since the systemd-boot needs to be built with 64bit instructions it can not use the x32 based libgcc.

Use the new override to ensure it gets overriden, linux-gnux32 could not be used because x86-64 has higher priority.

---
 meta/classes/image_types_wic.bbclass | 1 +
 meta/recipes-core/meta/wic-tools.bb  | 1 +
 2 files changed, 2 insertions(+)
meta/classes/image_types_wic.bbclass +1 -0
index b825b47ce5..b9503c69c5 100644
@@ -45,6 +45,7 @@ WKS_FILE_DEPENDS_DEFAULT = "syslinux-native bmap-tools-native cdrtools-native bt
 WKS_FILE_DEPENDS_BOOTLOADERS = ""
 WKS_FILE_DEPENDS_BOOTLOADERS_x86 = "syslinux grub-efi systemd-boot"
 WKS_FILE_DEPENDS_BOOTLOADERS_x86-64 = "syslinux grub-efi systemd-boot"
+WKS_FILE_DEPENDS_BOOTLOADERS_x86-x32 = "syslinux grub-efi"
 
 WKS_FILE_DEPENDS ??= "${WKS_FILE_DEPENDS_DEFAULT} ${WKS_FILE_DEPENDS_BOOTLOADERS}"
 
meta/recipes-core/meta/wic-tools.bb +1 -0
index 57dd37a440..09eb409e87 100644
@@ -10,6 +10,7 @@ DEPENDS = "\
            "
 DEPENDS_append_x86 = " syslinux grub-efi systemd-boot"
 DEPENDS_append_x86-64 = " syslinux grub-efi systemd-boot"
+DEPENDS_append_x86-x32 = " syslinux grub-efi"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
Signature · 1 line
2.11.0
author
#3 lore raw

PATCH v2 3/3 systemd-boot: Should not build x32

In reply to Saul Wold

Since systemd-boot is a bootloader, it needs to be built for the native IA instruction set size and x32 is not valid.

---
 meta/recipes-core/systemd/systemd-boot_234.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd-boot_234.bb +1 -0
index 655797f3cc..7b18b25e35 100644
@@ -21,6 +21,7 @@ EXTRA_OECONF = " --enable-gnuefi \
 # Imported from the old gummiboot recipe
 TUNE_CCARGS_remove = "-mfpmath=sse"
 COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
+COMPATIBLE_HOST_linux-gnux32 = "null"
 
 do_compile() {
 	SYSTEMD_BOOT_EFI_ARCH="ia32"
Signature · 1 line
2.11.0