Add -Werror to xcompile's testcc
[coreboot.git] / util / xcompile / xcompile
index b68e1b3a7910aa1ea28f86565d31709e2f385d9a..49263941dfa10d9d1ae47d884b661fa960f76ed1 100644 (file)
@@ -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