Usermode - POSIX and C conformance changes
[tpg/acess2.git] / Tools / GCCProxy / gccproxy.sh
index 477c476..801a1f1 100755 (executable)
@@ -73,11 +73,15 @@ while [[ $# -gt 0 ]]; do
 done
 
 run() {
-       #echo --- $*
+       if [[ "x$GCCPROXY_DEBUG" != "x" ]]; then
+               echo --- $*
+       fi
        $*
        return $?
 }
 
+_ldflags="-lposix -lpsocket "$_ldflags
+
 cfgfile=`mktemp`
 make --no-print-directory -f $BASEDIR/getconfig.mk ARCH=x86 TYPE=$_linktype > $cfgfile
 . $cfgfile
@@ -99,11 +103,11 @@ elif [[ $_compile -eq 1 ]]; then
 elif echo " $_miscargs" | grep '\.c' >/dev/null; then
        tmpout=`mktemp acess_gccproxy.XXXXXXXXXX.o --tmpdir`
        run $_CC $CFLAGS $_cflags $_miscargs -c -o $tmpout
-       run $_LD $LDFLAGS $_ldflags $_libs $tmpout $_outfile $LIBGCC_PATH $_libs
+       run $_LD $LDFLAGS $_ldflags $_libs $tmpout $_outfile $_libs $LIBGCC_PATH
        _rv=$?
        rm $tmpout
        exit $_rv
 else
-       run $_LD$_ldflags $_miscargs $_outfile $LDFLAGS  $_libs
+       run $_LD $_ldflags $_miscargs $_outfile $LDFLAGS $LIBGCC_PATH $_libs
 fi
 

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