X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=util%2Fxcompile%2Fxcompile;h=49263941dfa10d9d1ae47d884b661fa960f76ed1;hb=5e4e2290b653b068b1ca55205efd3fbfcc1fda34;hp=fd4dbeb278e7a261fe5ad02dd44c06c2aa8b8bf7;hpb=2aac3f6c51d6eb13da97f801d00bb73a2cdd4fdd;p=coreboot.git diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index fd4dbeb27..49263941d 100644 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -21,7 +21,7 @@ testcc() { echo "_start(void) {}" > .$$$$.c - $1 -nostdlib $2 .$$$$.c -o .$$$$.tmp 2>/dev/null >/dev/null + $1 -nostdlib -Werror $2 .$$$$.c -o .$$$$.tmp 2>/dev/null >/dev/null ret=$? rm -f .$$$$.c .$$$$.tmp return $ret @@ -35,7 +35,8 @@ for make in make gmake gnumake; do done GCCPREFIX=invalid -XGCCPATH="`pwd`/util/crossgcc/xgcc/bin/" +XGCCPATH=${1:-"`pwd`/util/crossgcc/xgcc/bin/"} +echo '#XGCCPATH='${XGCCPATH} TMPFILE=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz` touch $TMPFILE @@ -79,6 +80,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