From 8d427ece817bccbb15f4886cb2bf7734c1f4c3a2 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 12 Oct 2011 12:54:08 -0700 Subject: 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 Reviewed-on: http://review.coreboot.org/252 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/xcompile/xcompile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util/xcompile') diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index fd4dbeb278..b68e1b3a79 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 -- cgit v1.2.3