[44/45] Use substituted GDCFLAGS

Message ID 20230807111029.2320238-45-arsen@aarsen.me
State New
Headers
Series Synchronize shared build infrastructure with GCC tree |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Arsen Arsenović Aug. 7, 2023, 11:07 a.m. UTC
  From: Andreas Schwab <schwab@suse.de>

Use the substituted value for GCDFLAGS instead of hardcoding $(CFLAGS) so
that the subdir configure scripts use the configured value.

	* configure.ac (GDCFLAGS): Set default from ${CFLAGS}.
	* configure: Regenerate.
---
 configure    | 1 +
 configure.ac | 1 +
 2 files changed, 2 insertions(+)
  

Patch

diff --git a/configure b/configure
index 14cbcfc20b2..28f0913bdd4 100755
--- a/configure
+++ b/configure
@@ -13026,6 +13026,7 @@  fi
 
 
 
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5
diff --git a/configure.ac b/configure.ac
index 861432a5b23..5d25dc864c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3717,6 +3717,7 @@  AC_SUBST(CFLAGS)
 AC_SUBST(CXXFLAGS)
 AC_SUBST(GDC)
 AC_SUBST(GDCFLAGS)
+GDCFLAGS=${GDCFLAGS-${CFLAGS}}
 AC_SUBST(PKG_CONFIG_PATH)
 
 GCC_PLUGIN_OPTION(PLUGIN_OPTION)