mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
wrappers/cc: also process forbidden -I/-L paths with blanks.
like "-I /usr/include".
This commit is contained in:
parent
f1faf02d82
commit
1b0a232b20
1 changed files with 20 additions and 2 deletions
|
@ -8,12 +8,30 @@ ARGS=("$@")
|
||||||
i=0
|
i=0
|
||||||
while [ $i -lt ${#ARGS[@]} ]; do
|
while [ $i -lt ${#ARGS[@]} ]; do
|
||||||
arg="${ARGS[$i]}"
|
arg="${ARGS[$i]}"
|
||||||
if [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" ]; then
|
if [ "$incpath" ]; then
|
||||||
|
if [ "$arg" = "/usr/include" ]; then
|
||||||
|
echo "[cc-wrapper] ignoring -I $arg"
|
||||||
|
unset incpath
|
||||||
|
else
|
||||||
|
MYARGS+=("-I${arg}")
|
||||||
|
fi
|
||||||
|
elif [ "$libpath" ]; then
|
||||||
|
if [ "$arg" = "/usr/lib" ]; then
|
||||||
|
echo "[cc-wrapper] ignoring -L $arg"
|
||||||
|
unset libpath
|
||||||
|
else
|
||||||
|
MYARGS+=("-L${arg}")
|
||||||
|
fi
|
||||||
|
elif [ "$arg" = "-I" ]; then
|
||||||
|
incpath=1
|
||||||
|
elif [ "$arg" = "-L" ]; then
|
||||||
|
libpath=1
|
||||||
|
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" ]; then
|
||||||
echo "[cc-wrapper] ignoring $arg"
|
echo "[cc-wrapper] ignoring $arg"
|
||||||
else
|
else
|
||||||
MYARGS+=("${arg}")
|
MYARGS+=("${arg}")
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
#echo "[cc-wrapper] ${MYARGS[@]}"
|
#echo "[cc-wrapper] @BIN@ ${MYARGS[@]}"
|
||||||
exec @BIN@ "${MYARGS[@]}"
|
exec @BIN@ "${MYARGS[@]}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue