buildROM subverts the CPU_OPT flag to pass in flags to the LinuxBIOS build,
especially -fno-stack-protector. This adds $(CPU_OPT) to one of the targets
in the new GA-2761GXDK build to avoid getting the hated _stack_chk_failed
error.
--
Jordan Crouse
Systems Software Development Engineer
Advanced Micro Devices, Inc.
[LINUXBIOS] Add the CPU_OPT flag to facilitate passing flags into the build
buildROM passes build flags through the CPU_OPT environment variable -
especially -fno-stack-protector for those of us lucky enough to have
Debian/Ubuntu. This adds $(CPU_OPT) to the cache_as_ram_auto.inc target
for the GA-2761GXDK so that the resulting cpu0.S is clean.
Signed-off-by: Jordan Crouse
jordan.crouse@amd.com
Index: svn/src/mainboard/gigabyte/ga_2761gxdk/Config.lb
===================================================================
--- svn.orig/src/mainboard/gigabyte/ga_2761gxdk/Config.lb 2007-10-31 13:20:34.000000000 -0600
+++ svn/src/mainboard/gigabyte/ga_2761gxdk/Config.lb 2007-10-31 13:20:44.000000000 -0600
@@ -92,7 +92,7 @@
else
makerule ./cache_as_ram_auto.inc
depends "$(MAINBOARD)/cache_as_ram_auto.c option_table.h"
- action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
+ action "$(CC) -I$(TOP)/src -I. $(CPPFLAGS) $(CPU_OPT) $(MAINBOARD)/cache_as_ram_auto.c -Os -nostdinc -nostdlib -fno-builtin -Wall -c -S -o $@"
action "perl -e 's/.rodata/.rom.data/g' -pi $@"
action "perl -e 's/.text/.section .rom.text/g' -pi $@"
end