]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Build with at least -O1 as workaround 24233/head
authorJan Janssen <medhefgo@web.de>
Sat, 6 Aug 2022 07:07:47 +0000 (09:07 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 6 Aug 2022 14:42:34 +0000 (15:42 +0100)
Fixes: #24202
src/boot/efi/meson.build

index 83f7384530b1f0b51067d9852a819fa2c8582166..127b4e17a3a722c6ef90a95d8c732a8053f30e5d 100644 (file)
@@ -199,6 +199,12 @@ efi_cflags = [
         ]
 )
 
+# On some distros, sd-boot/-stub may trigger some bug somewhere that will cause
+# kernel execution to fail. The cause seems to be purely based on code size and
+# always compiling with at least -O1 will work around that.
+# https://github.com/systemd/systemd/issues/24202
+efi_cflags += '-O1'
+
 efi_cflags += cc.get_supported_arguments({
         'ia32':   ['-mno-sse', '-mno-mmx'],
         'x86_64': ['-mno-red-zone', '-mno-sse', '-mno-mmx'],