From 520be3a5de9cb98cfb972f3e13c1d979dfca75d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Tue, 9 Feb 2021 22:52:56 -0300 Subject: [PATCH] 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. --- common/wrappers/cross-cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/wrappers/cross-cc b/common/wrappers/cross-cc index f5333a03bb2..0e08bc91d0f 100644 --- a/common/wrappers/cross-cc +++ b/common/wrappers/cross-cc @@ -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}")