X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Tools%2FGCCProxy%2Fgccproxy.sh;h=5a126a9235e48fef609673051d1543d8b17e3af8;hb=9edb6f7c288a93d9f9ce3f7233b577a601471071;hp=1624fe0e31c3e0bca0d44f045ffdb8a7ed4bcb2d;hpb=13a05e65cf34886163b596193d129fbfcac3c55f;p=tpg%2Facess2.git diff --git a/Tools/GCCProxy/gccproxy.sh b/Tools/GCCProxy/gccproxy.sh index 1624fe0e..5a126a92 100755 --- a/Tools/GCCProxy/gccproxy.sh +++ b/Tools/GCCProxy/gccproxy.sh @@ -16,6 +16,8 @@ _miscargs="" _compile=0 _linktype=Applications +echo [GCCProxy] $* >&2 + while [[ $# -gt 0 ]]; do case "$1" in -E) @@ -65,6 +67,14 @@ while [[ $# -gt 0 ]]; do echo $0 --inv=ld exit 0 ;; + -dumpspecs) + _compile=1 + _miscargs=$_miscargs" $1" + ;; + -dumpversion) + _compile=1 + _miscargs=$_miscargs" $1" + ;; *) _miscargs=$_miscargs" $1" ;; @@ -81,6 +91,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 +100,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