xbps-src: create a cc/g++ wrapper to drop -I/usr/include -L/usr/lib in cross.

I'm tired of wasting extra time to fix software to remove standard include/lib dirs.
This commit is contained in:
Juan RP
2015-10-23 11:49:36 +02:00
parent 07fd8e0b97
commit b7d05057f9
2 changed files with 32 additions and 0 deletions

14
common/wrappers/cc Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
# compiler wrapper to get rid of -I/usr/include and -L/usr/lib, that fucks up
# cross compilation badly.
MYARGS=
for i in $@; do
if [ $i = "-L/usr/lib" -o $i = "-I/usr/include" ]; then
continue
else
MYARGS+="$i "
fi
done
exec @BIN@ ${MYARGS}