wxGTK-3.2.2.1-dont-break-flags.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From f092f50b794b487e552e930b11d165a736fc8edb Mon Sep 17 00:00:00 2001
  2. From: Arsen Arsenović <arsen@gentoo.org>
  3. Date: Sun, 2 Apr 2023 13:25:11 +0200
  4. Subject: [PATCH] configure: Remove flag deduplication logic
  5. Parsing compiler flags is a complex task that this function screws up.
  6. Bug: https://bugs.gentoo.org/903668
  7. ---
  8. configure | 5 ++---
  9. configure.in | 5 ++---
  10. 2 files changed, 4 insertions(+), 6 deletions(-)
  11. diff --git a/configure b/configure
  12. index a476a3c..a9b815b 100755
  13. --- a/configure
  14. +++ b/configure
  15. @@ -45550,9 +45550,8 @@ esac
  16. dedup_flags()
  17. {
  18. - printf "%s " "$@" |
  19. - awk 'BEGIN { RS=" "; ORS=" " }
  20. - { if ($0=="-arch" || $0=="-framework" || !seen[$0]++) print }'
  21. + # Gentoo: Don't hack out flags, parsing them is complex.
  22. + printf '%s ' "$@"
  23. }
  24. WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
  25. diff --git a/configure.in b/configure.in
  26. index a4c4178..9cf9c30 100644
  27. --- a/configure.in
  28. +++ b/configure.in
  29. @@ -8570,9 +8570,8 @@ dnl flags which are explicitly allowed to occur multiple times, as all their
  30. dnl occurrences must be preserved).
  31. dedup_flags()
  32. {
  33. - printf "%s " "$@" |
  34. - awk 'BEGIN { RS=" "; ORS=" " }
  35. - { if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }'
  36. + # Gentoo: Don't hack out flags, parsing them is complex.
  37. + printf '%s ' "$@"
  38. }
  39. WX_CPPFLAGS=`dedup_flags "$CPPFLAGS"`
  40. --
  41. 2.40.0