]> xenbits.xen.org Git - xenclient/build.git/commitdiff
dependencies: Check for ccache.
authorJean Guyader <jean.guyader@eu.citrix.com>
Tue, 24 Nov 2009 14:31:01 +0000 (14:31 +0000)
committerJean Guyader <jean.guyader@eu.citrix.com>
Tue, 24 Nov 2009 14:31:01 +0000 (14:31 +0000)
toolchain/dependencies/dependencies.sh

index 66f95c2daa28cbd362c93d1fe6a746a60a7abb40..17151bf7666af3332610ce5471309b687c9aa2bf 100755 (executable)
@@ -438,6 +438,20 @@ rm -f "$tmpfile.c"
 rm -f "$tmpfile"
 
 
+# Check if ccache can create binary
+tmpfile=`mktemp`
+cat &>"$tmpfile.c" <<EOF
+int main(void)
+{ return 0; }
+EOF
+if ! $CCACHE_CC "$tmpfile.c" -o "$tmpfile"  > /dev/null 2>&1 && "$tmpfile" ; then
+       disp "ccache" "KO"
+       exit 1;
+fi
+disp "ccache" "OK"
+rm -f "$tmpfile.c"
+rm -f "$tmpfile"
+
 #############################################################
 #
 # All done