2015-10-25 10:09:36 +01:00
|
|
|
#!/bin/bash
|
2015-10-23 11:49:36 +02:00
|
|
|
|
|
|
|
# compiler wrapper to get rid of -I/usr/include and -L/usr/lib, that fucks up
|
|
|
|
# cross compilation badly.
|
2015-10-25 10:09:36 +01:00
|
|
|
declare -a MYARGS
|
2015-10-23 11:49:36 +02:00
|
|
|
|
2015-10-25 10:09:36 +01:00
|
|
|
ARGS=("$@")
|
|
|
|
i=0
|
|
|
|
while [ $i -lt ${#ARGS[@]} ]; do
|
|
|
|
arg="${ARGS[$i]}"
|
|
|
|
if [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" ]; then
|
|
|
|
echo "[cc-wrapper] ignoring $arg"
|
2015-10-23 11:49:36 +02:00
|
|
|
else
|
2015-10-25 10:09:36 +01:00
|
|
|
MYARGS+=("${arg}")
|
2015-10-23 11:49:36 +02:00
|
|
|
fi
|
2015-10-25 10:09:36 +01:00
|
|
|
i=$((i+1))
|
2015-10-23 11:49:36 +02:00
|
|
|
done
|
2015-10-25 10:09:36 +01:00
|
|
|
#echo "[cc-wrapper] ${MYARGS[@]}"
|
|
|
|
exec @BIN@ "${MYARGS[@]}"
|