Init, adding corrade,magnum,magnum-plugins,magnum-integration,magnum-extras, and magnum-examples 2025.47_1
This commit is contained in:
40
common/wrappers/cross-cc
Normal file
40
common/wrappers/cross-cc
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# compiler wrapper to get rid of -I/usr/include and -L/usr/lib, that fucks up
|
||||
# cross compilation badly.
|
||||
declare -a MYARGS
|
||||
|
||||
ARGS=("$@")
|
||||
i=0
|
||||
while [ $i -lt ${#ARGS[@]} ]; do
|
||||
arg="${ARGS[$i]}"
|
||||
if [ -n "$incpath" ]; then
|
||||
if [ "$arg" = "/usr/include" ]; then
|
||||
echo "[cc-wrapper] ignoring ${incpath} $arg"
|
||||
else
|
||||
MYARGS+=("${incpath}${arg}")
|
||||
fi
|
||||
unset incpath
|
||||
elif [ "$libpath" ]; then
|
||||
# XXX: avoid so much repetition
|
||||
if [ "$arg" = "/usr/lib" -o "$arg" = "/usr/lib32" -o "$arg" = "/usr/lib64" -o "$arg" = "/lib" ]; then
|
||||
echo "[cc-wrapper] ignoring -L $arg"
|
||||
else
|
||||
MYARGS+=("-L${arg}")
|
||||
fi
|
||||
unset libpath
|
||||
elif [ "$arg" = "-I" -o "$arg" = "-isystem" ]; then
|
||||
incpath="$arg"
|
||||
elif [ "$arg" = "-L" ]; then
|
||||
libpath=1
|
||||
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-isystem/usr/include" \
|
||||
-o "$arg" = "-L/usr/lib32" -o "$arg" = "-L/usr/lib64" \
|
||||
-o "$arg" = "-L/usr/lib" -o "$arg" = "-L/lib" ]; then
|
||||
echo "[cc-wrapper] ignoring $arg"
|
||||
else
|
||||
MYARGS+=("${arg}")
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
#echo "[cc-wrapper] @BIN@ ${MYARGS[@]}"
|
||||
exec @BIN@ "${MYARGS[@]}"
|
||||
Reference in New Issue
Block a user