Tools/GCCProxy - Tweaked to handle --version correctly
authorJohn Hodge <[email protected]>
Wed, 12 Jun 2013 03:55:10 +0000 (11:55 +0800)
committerJohn Hodge <[email protected]>
Wed, 12 Jun 2013 03:55:10 +0000 (11:55 +0800)
Tools/GCCProxy/gccproxy.sh

index 5be7b6e..7448d38 100755 (executable)
@@ -90,8 +90,21 @@ rm $cfgfile
 
 #echo "_compile = $_compile, _preproc = $_preproc"
 
+if [[ "x$_verarg" != "x" ]]; then
+       if [[ "x$_actas" == "xld" ]]; then
+               run $_LD $_miscargs $_verarg
+       else
+               run $_CC $_miscargs $_verarg
+       fi
+       exit $?
+fi
+
 if [[ "x$_actas" == "xld" ]]; then
-       run $_LD $LDFLAGS $_ldflags $_outfile $_miscargs $LIBGCC_PATH $_libs
+       if echo "$_miscargs" | grep '\.o\|\.a'; then
+               run $_LD $LDFLAGS $_ldflags $_outfile $_miscargs $LIBGCC_PATH $_libs
+       else
+               run $_LD $_miscargs $_verarg
+       fi
        exit $?
 fi
 

UCC git Repository :: git.ucc.asn.au