X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Tools%2FGCCProxy%2Fgccproxy.sh;h=7448d38df46e46bfeb7ae1c864a13f24cb96c27b;hb=41e7d6a1d996936670f164a26580f18b727c6450;hp=801a1f1b6bfa65e8a54f678cf26d76dea91568ea;hpb=e91f60e14b8857312238d729fa580d6ab44ba27a;p=tpg%2Facess2.git diff --git a/Tools/GCCProxy/gccproxy.sh b/Tools/GCCProxy/gccproxy.sh index 801a1f1b..7448d38d 100755 --- a/Tools/GCCProxy/gccproxy.sh +++ b/Tools/GCCProxy/gccproxy.sh @@ -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 @@ -108,6 +122,6 @@ elif echo " $_miscargs" | grep '\.c' >/dev/null; then rm $tmpout exit $_rv else - run $_LD $_ldflags $_miscargs $_outfile $LDFLAGS $LIBGCC_PATH $_libs + run $_LD $_ldflags $_miscargs $_outfile $LDFLAGS $_libs $LIBGCC_PATH fi