[PATCH] build: Remove -fno-stack-protector-all from EMBEDDED_EXTRA_CFLAGS

Andrew Cooper posted 1 patch 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20241125120406.3258813-1-andrew.cooper3@citrix.com
Config.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] build: Remove -fno-stack-protector-all from EMBEDDED_EXTRA_CFLAGS
Posted by Andrew Cooper 1 week, 4 days ago
This seems to have been introduced in commit f8beb54e2455 ("Disable PIE/SSP
features when building Xen, if GCC supports them.") in 2004.

However, neither GCC nor Clang appear to have ever supported taking the
negated form of -fstack-protector-all, meaning this been useless ever since
its introduction.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index f1eab9a20a66..fa0414055b93 100644
--- a/Config.mk
+++ b/Config.mk
@@ -190,7 +190,7 @@ endif
 APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
 APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
 
-EMBEDDED_EXTRA_CFLAGS := -fno-pie -fno-stack-protector -fno-stack-protector-all
+EMBEDDED_EXTRA_CFLAGS := -fno-pie -fno-stack-protector
 EMBEDDED_EXTRA_CFLAGS += -fno-exceptions -fno-asynchronous-unwind-tables
 
 XEN_EXTFILES_URL ?= https://xenbits.xen.org/xen-extfiles

base-commit: 2e853c19204e2d660a8becf4b377cc99216854dd
-- 
2.39.5
Re: [PATCH] build: Remove -fno-stack-protector-all from EMBEDDED_EXTRA_CFLAGS
Posted by Jan Beulich 1 week, 4 days ago
On 25.11.2024 13:04, Andrew Cooper wrote:
> This seems to have been introduced in commit f8beb54e2455 ("Disable PIE/SSP
> features when building Xen, if GCC supports them.") in 2004.
> 
> However, neither GCC nor Clang appear to have ever supported taking the
> negated form of -fstack-protector-all, meaning this been useless ever since
> its introduction.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>