From: Jan Janssen Date: Tue, 2 Nov 2021 09:47:41 +0000 (+0100) Subject: sd-boot: Fix efi_arch checks X-Git-Tag: v250-rc1~355^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1da89000467387c90967558f481235dc66f347c;p=thirdparty%2Fsystemd.git sd-boot: Fix efi_arch checks efi_arch is set to whatever meson returns from host_machine.cpu_family() and gnu_efi_arch is then set accordingly. On x86, efi_arch == x86 and gnu_efi_arch == ia32. Surprisingly, compilation worked (without disabling some instruction sets) and nobody ever complained about systemd-bootia32.efi not working. --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index a0f9243b5be..40b0ab0dbd8 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -45,7 +45,7 @@ stub_sources = ''' cpio.c '''.split() -if ['ia32', 'x86_64'].contains(efi_arch) +if efi_arch in ['x86', 'x86_64'] stub_sources += 'linux_x86.c' else stub_sources += 'linux.c' @@ -229,7 +229,7 @@ if have_gnu_efi compile_args += ['-mno-red-zone', '-mno-sse', '-mno-mmx'] - elif efi_arch == 'ia32' + elif efi_arch == 'x86' compile_args += ['-mno-sse', '-mno-mmx'] elif efi_arch == 'arm'