Stefan Reinauer (stefan.reinauer@coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/252
-gerrit
commit b1305505c57e4a4c34cf7f11b7028bf52dc8fd2a Author: Stefan Reinauer reinauer@chromium.org Date: Wed Oct 12 12:54:08 2011 -0700
Fix romstage creation with gcc 4.6 and CAR targets
newer gcc versions generate ".section .text" instead of just ".text" in their assembler output. This patch makes sure that we don't end up with a superfluous ".section" that makes the build fail.
Add -Wno-unused-but-set-variable to CFLAGS if the flag exists.
Change-Id: I7f24c987433cc5886dde2af27498d3331cbda303 Signed-off-by: Stefan Reinauer reinauer@google.com --- src/arch/x86/Makefile.inc | 3 ++- util/xcompile/xcompile | 4 ++++ 2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index e9c00de..65c2a92 100755 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -247,7 +247,8 @@ $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDD
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc @printf " POST romstage.inc\n" - sed -e 's/.rodata/.rom.data/g' -e 's/.text/.section .rom.text/g' $^ > $@.tmp + sed -e 's/.rodata/.rom.data/g' -e 's/^.text/.section .rom.text/g' \ + -e 's/^.section .text/.section .rom.text/g' $^ > $@.tmp mv $@.tmp $@ endif
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index fd4dbeb..b68e1b3 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -79,6 +79,10 @@ CC="${GCCPREFIX}gcc" testcc "$CC" "$CFLAGS-Wa,--divide " && CFLAGS="$CFLAGS-Wa,--divide " testcc "$CC" "$CFLAGS-fno-stack-protector " && CFLAGS="$CFLAGS-fno-stack-protector " testcc "$CC" "$CFLAGS-Wl,--build-id=none " && CFLAGS="$CFLAGS-Wl,--build-id=none " +# GCC 4.6 is much more picky about unused variables. Turn off it's warnings for +# now: +testcc "$CC" "$CFLAGS-Wno-unused-but-set-variable " && \ + CFLAGS="$CFLAGS-Wno-unused-but-set-variable "
if which gcc 2>/dev/null >/dev/null; then HOSTCC=gcc