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
|
|
|
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
|
2003-07-28 23:15:03 +02:00
|
|
|
if test "$i" == "-S"; then
|
|
|
|
justcompile=1
|
|
|
|
fi
|
|
|
|
if test "$i" == "-E"; then
|
|
|
|
justcompile=1
|
|
|
|
fi
|
2003-07-24 17:15:48 +02:00
|
|
|
done
|
|
|
|
|
2003-07-28 23:15:03 +02:00
|
|
|
IFS=" "
|
2003-08-04 09:13:29 +02:00
|
|
|
extra=($NIX_CFLAGS)
|
2003-07-24 17:15:48 +02:00
|
|
|
if test "$justcompile" != "1"; then
|
2003-07-28 23:15:03 +02:00
|
|
|
extra=(${extra[@]} $NIX_LDFLAGS)
|
2003-08-18 17:32:13 +02:00
|
|
|
if test "$NIX_STRIP_DEBUG" == "1"; then
|
|
|
|
extra=(${extra[@]} -Wl,-s)
|
|
|
|
fi
|
2003-07-24 17:15:48 +02:00
|
|
|
fi
|
|
|
|
|
2003-07-28 23:15:03 +02:00
|
|
|
if test "$NIX_DEBUG" == "1"; then
|
2003-08-18 17:32:13 +02:00
|
|
|
echo "extra gcc flags:" >&2
|
2003-07-28 23:15:03 +02:00
|
|
|
for i in ${extra[@]}; do
|
2003-08-18 17:32:13 +02:00
|
|
|
echo " $i" >&2
|
2003-07-28 23:15:03 +02:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
IFS=
|
2003-08-18 19:49:30 +02:00
|
|
|
exec @GCC@ $@ ${extra[@]}
|