Conditionally add -fno-stack-protector to CFLAGS
PATCH RESEND 1/1 Conditionally add -fno-stack-protector to CFLAGS
From: Haavard Skinnemoen <[email protected]>
When compile-testing on powerpc, I get errors like this:
/home/hskinnemoen/work/git/u-boot/net/nfs.c:422: undefined reference to `__stack_chk_fail_local'
This seems to be because -fstack-protector is on by default, so let's explicitly disable it on all architectures that support the option.
The Ubuntu toolchain is affected by this problem, and according to Mike Frysinger, Gentoo has been running with SSP enabled for years. More and more distros are turning SSP on by default, so this problem is likely to get worse in the future.
Also, powerpc just happens to be one of the arches I do compile-testing on. There may be other arches affected by this too.
---
This patch was previously posted
* Dec 11 2007
* May 19 2008
Doesn't anyone care about this build breakage?
config.mk | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
config.mk +2 -0
@@ -172,6 +172,8 @@ else CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes endif +CFLAGS += $(call cc-option,-fno-stack-protector) + # avoid trigraph warnings while parsing pci.h (produced by NIOS gcc-2.9) # this option have to be placed behind -Wall -- that's why it is here ifeq ($(ARCH),nios)
Signature · 1 line
1.5.5.3
PATCH RESEND 1/1 Conditionally add -fno-stack-protector to CFLAGS
Quoted 2 lines · In message <[email protected]>…
When compile-testing on powerpc, I get errors like this:
...
Quoted 5 lines
This patch was previously posted
* Dec 11 2007
* May 19 2008Doesn't anyone care about this build breakage?
This was applied in the meantime.
Note that it might be helpful if you exactly specified which toolchain versions show the problem. Just "Ubuntu" and "Gentoo" is by far not specific enough.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Single tasking: Just Say No.