]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make test suite work with CC="gcc -std=gnu99"
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 23 Jul 2016 18:17:14 +0000 (20:17 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 23 Jul 2016 18:17:14 +0000 (20:17 +0200)
test.sh

diff --git a/test.sh b/test.sh
index bf9bff8a875f1890841153b09dbe2d89c7941ab5..cc77312f5c8462fae639330b753ff6319ba14243 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -578,6 +578,7 @@ EOF
 "$@"
 [ x$2 = x-fcolor-diagnostics ] && shift
 [ x$2 = x-fdiagnostics-color ] && shift
+[ x$2 = x-std=gnu99 ] && shift
 [ x$3 = x-o ] && rm $4
 EOF
     chmod +x prefix-remove.sh
@@ -593,6 +594,7 @@ EOF
 "$@"
 [ x$2 = x-fcolor-diagnostics ] && shift
 [ x$2 = x-fdiagnostics-color ] && shift
+[ x$2 = x-std=gnu99 ] && shift
 [ x$3 = x-o ] && cp /dev/null $4
 EOF
     chmod +x prefix-empty.sh
@@ -783,13 +785,15 @@ base_suite() {
 }
 
 link_suite() {
-    if [ `dirname $COMPILER` = . ]; then
-        ln -s "$CCACHE" $COMPILER
-        CCACHE_COMPILE="./$COMPILER"
+    compiler_binary=`echo $COMPILER | cut -d' ' -f1`
+    compiler_args=`echo $COMPILER | cut -d' ' -f2-`
+    if [ `dirname $compiler_binary` = . ]; then
+        ln -s "$CCACHE" $compiler_binary
+        CCACHE_COMPILE="./$compiler_binary $compiler_args"
         base_tests
-        rm -f $COMPILER
+        rm -f $compiler_binary
     else
-        echo "Compiler ($COMPILER) not taken from PATH -- not running link test"
+        echo "Compiler ($compiler_binary) not taken from PATH -- not running link test"
     fi
 }