Fix handling of duplicate -arch or -framework options

See #23356
This commit is contained in:
Paul Cornett 2023-03-17 11:56:59 -07:00
parent 8ad0f52da0
commit 30181a9dd9
2 changed files with 11 additions and 5 deletions

6
configure vendored
View file

@ -43239,7 +43239,11 @@ dedup_flags()
{
printf "%s " "$@" |
awk 'BEGIN { RS=" "; ORS=" " }
{ if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }'
{
if ($0=="") next
if ($0=="-arch" || $0=="-framework") { x=$0; next }
if (x!="") x=x " " $0; else x=$0; if (!seen[x]++) print x; x=""
}'
}
WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`