Fix romstage creation with gcc 4.6 and CAR targets
[coreboot.git] / util / xcompile / xcompile
index fd4dbeb278e7a261fe5ad02dd44c06c2aa8b8bf7..b68e1b3a7910aa1ea28f86565d31709e2f385d9a 100644 (file)
@@ -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