1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

boot: Build with at least -O1 as workaround

Fixes: #24202
(cherry picked from commit 2fb11652381c199ad19bb469e530543366d99dd4)
This commit is contained in:
Jan Janssen 2022-08-06 09:07:47 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 6a9cf204a7
commit b0da0d6102

View File

@ -200,6 +200,12 @@ efi_cflags = cc.get_supported_arguments(
'-include', version_h,
]
# 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'],