2003-07-24 17:15:48 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2003-07-25 16:59:22 +02:00
|
|
|
IFS=
|
|
|
|
|
2003-07-24 17:15:48 +02:00
|
|
|
realgcc=@GCC@
|
|
|
|
libc=@LIBC@
|
|
|
|
|
|
|
|
justcompile=0
|
2003-07-25 16:59:22 +02:00
|
|
|
for i in $@; do
|
2003-07-24 17:15:48 +02:00
|
|
|
if test "$i" == "-c"; then
|
|
|
|
justcompile=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2003-07-25 16:59:22 +02:00
|
|
|
extra=("-isystem" "$libc/include")
|
2003-07-24 17:15:48 +02:00
|
|
|
if test "$justcompile" != "1"; then
|
2003-07-25 16:59:22 +02:00
|
|
|
extra=(${extra[@]} "-L" "$libc/lib" "-Wl,-dynamic-linker,$libc/lib/ld-linux.so.2,-rpath,$libc/lib")
|
2003-07-24 17:15:48 +02:00
|
|
|
fi
|
|
|
|
|
2003-07-25 16:59:22 +02:00
|
|
|
exec $realgcc $@ ${extra[@]}
|