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.

Signed-off-by: Haavard Skinnemoen <[EMAIL PROTECTED]>
---
This was posted Dec 11 2007. It got no negative responses, but it was
never merged.

Sending it again because I mistyped the u-boot-users address. Sorry
about that.

 config.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 62fc1d5..9aa9cee 100644
--- a/config.mk
+++ b/config.mk
@@ -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)
-- 
1.5.4.3


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to