]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-boot: Fix efi_arch checks 21225/head
authorJan Janssen <medhefgo@web.de>
Tue, 2 Nov 2021 09:47:41 +0000 (10:47 +0100)
committerJan Janssen <medhefgo@web.de>
Thu, 4 Nov 2021 17:54:31 +0000 (18:54 +0100)
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.

src/boot/efi/meson.build

index a0f9243b5be82e15c5be0c5246b3a000dea7aa1f..40b0ab0dbd8256ca7ad954829c629aed5218cf17 100644 (file)
@@ -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'