git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tools/GCCProxy - add -print-multi-os-directory handling
[tpg/acess2.git]
/
Tools
/
GCCProxy
/
gccproxy.sh
diff --git
a/Tools/GCCProxy/gccproxy.sh
b/Tools/GCCProxy/gccproxy.sh
index
5be7b6e
..
410a476
100755
(executable)
--- a/
Tools/GCCProxy/gccproxy.sh
+++ b/
Tools/GCCProxy/gccproxy.sh
@@
-16,6
+16,8
@@
_miscargs=""
_compile=0
_linktype=Applications
_compile=0
_linktype=Applications
+echo [GCCProxy] $* >&2
+
while [[ $# -gt 0 ]]; do
case "$1" in
-E)
while [[ $# -gt 0 ]]; do
case "$1" in
-E)
@@
-48,6
+50,9
@@
while [[ $# -gt 0 ]]; do
arg=${arg/,/ }
_ldflags=$_ldflags" ${arg}"
;;
arg=${arg/,/ }
_ldflags=$_ldflags" ${arg}"
;;
+ -Wall|-Werror|-Wextra)\
+ _cflags=$_cflags" $1"
+ ;;
-l|-L)
_libs=$_libs" $1$2"
shift
-l|-L)
_libs=$_libs" $1$2"
shift
@@
-61,10
+66,25
@@
while [[ $# -gt 0 ]]; do
--inv=ld)
_actas=ld
;;
--inv=ld)
_actas=ld
;;
+ -pthread)
+ _ldflags=$_ldflags" -lpthread"
+ ;;
-print-prog-name=ld)
echo $0 --inv=ld
exit 0
;;
-print-prog-name=ld)
echo $0 --inv=ld
exit 0
;;
+ -print-multi-os-directory)
+ _compile=1
+ _cflags=$_cflags" $1"
+ ;;
+ -dumpspecs)
+ _compile=1
+ _miscargs=$_miscargs" $1"
+ ;;
+ -dumpversion)
+ _compile=1
+ _miscargs=$_miscargs" $1"
+ ;;
*)
_miscargs=$_miscargs" $1"
;;
*)
_miscargs=$_miscargs" $1"
;;
@@
-90,8
+110,21
@@
rm $cfgfile
#echo "_compile = $_compile, _preproc = $_preproc"
#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
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
exit $?
fi
UCC
git Repository :: git.ucc.asn.au