From f092f50b794b487e552e930b11d165a736fc8edb Mon Sep 17 00:00:00 2001 From: Arsen Arsenović Date: Sun, 2 Apr 2023 13:25:11 +0200 Subject: [PATCH] configure: Remove flag deduplication logic Parsing compiler flags is a complex task that this function screws up. Bug: https://bugs.gentoo.org/903668 --- configure | 5 ++--- configure.in | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a476a3c..a9b815b 100755 --- a/configure +++ b/configure @@ -45550,9 +45550,8 @@ esac dedup_flags() { - printf "%s " "$@" | - awk 'BEGIN { RS=" "; ORS=" " } - { if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }' + # Gentoo: Don't hack out flags, parsing them is complex. + printf '%s ' "$@" } WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"` diff --git a/configure.in b/configure.in index a4c4178..9cf9c30 100644 --- a/configure.in +++ b/configure.in @@ -8570,9 +8570,8 @@ dnl flags which are explicitly allowed to occur multiple times, as all their dnl occurrences must be preserved). dedup_flags() { - printf "%s " "$@" | - awk 'BEGIN { RS=" "; ORS=" " } - { if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }' + # Gentoo: Don't hack out flags, parsing them is complex. + printf '%s ' "$@" } WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"` -- 2.40.0