From: Jan Janssen Date: Sat, 6 Aug 2022 07:07:47 +0000 (+0200) Subject: boot: Build with at least -O1 as workaround X-Git-Tag: v252-rc1~503 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24233%2Fhead;p=thirdparty%2Fsystemd.git boot: Build with at least -O1 as workaround Fixes: #24202 --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 83f7384530b..127b4e17a3a 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -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'],