From: Duy Nguyen Van Date: Tue, 7 Oct 2025 04:09:19 +0000 (+0900) Subject: Fix build fail when add option "-fstack-protector-all" X-Git-Tag: v259-rc1~344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ae7c014c37ba1cc7948c1ab2db8a79091bb2cc0;p=thirdparty%2Fsystemd.git Fix build fail when add option "-fstack-protector-all" When using canary check with "-fstack-protector-all" option. It causes a configure error in systemd-boot when meson.build executes compile simple code to test linker option "-static-pie" because -nolibstd option prevents using libc. It need for canary to provide some function as "__stack_chk_guard". So need to turn off canary check when compile sanity check. --- diff --git a/src/boot/meson.build b/src/boot/meson.build index 61c8be218cf..ee86af274eb 100644 --- a/src/boot/meson.build +++ b/src/boot/meson.build @@ -207,7 +207,7 @@ efi_c_ld_args = [ ] linker_sanity_code = 'void a(void) {}; void _start(void) { a(); }' -linker_sanity_args = ['-nostdlib', '-Wl,--fatal-warnings'] +linker_sanity_args = ['-nostdlib', '-Wl,--fatal-warnings', '-fno-stack-protector'] # Check if libgcc is available and then use it. It is needed for gcc builds # and for ia32 builds with clang.