Externals/common.mk - Fixed depenency issues
[tpg/acess2.git] / Tools / GCCProxy / gccproxy.sh
index 1624fe0..7448d38 100755 (executable)
@@ -81,6 +81,7 @@ run() {
 }
 
 _ldflags="-lposix -lpsocket "$_ldflags
+_cflags=$_cflags" -fno-omit-frame-pointer"
 
 cfgfile=`mktemp`
 make --no-print-directory -f $BASEDIR/getconfig.mk ARCH=x86 TYPE=$_linktype > $cfgfile
@@ -89,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