common/wrappers: add -L/usr/lib{32,64} to arguments ignored by cross-cc.

Detected when cross building timg after rebuilding GraphicsMagick with
new libdir directories. Could be fixed in all offending packages, but
it's easier to fix it in one place, and arguably more correct.
This commit is contained in:
Érico Rolim 2021-02-09 22:52:56 -03:00
parent d1ffbe13b3
commit 520be3a5de

View file

@ -16,7 +16,8 @@ while [ $i -lt ${#ARGS[@]} ]; do
fi
unset incpath
elif [ "$libpath" ]; then
if [ "$arg" = "/usr/lib" -o "$arg" = "/lib" ]; 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}")
@ -26,7 +27,9 @@ while [ $i -lt ${#ARGS[@]} ]; do
incpath=1
elif [ "$arg" = "-L" ]; then
libpath=1
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" -o "$arg" = "-L/lib" ]; then
elif [ "$arg" = "-I/usr/include" -o "$arg" = "-L/usr/lib" \
-o "$arg" = "-L/usr/lib32" -o "$arg" = "-L/usr/lib64" \
-o "$arg" = "-L/lib" ]; then
echo "[cc-wrapper] ignoring $arg"
else
MYARGS+=("${arg}")