[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] configure: Fix default -O2 being added when CFLAGS not set

From: Glenn Washburn
Subject: [PATCH v2] configure: Fix default -O2 being added when CFLAGS not set
Date: Mon, 28 Mar 2022 12:56:22 -0500

Autoconf will set a default CFLAGS of "-g -O2" if CFLAGS is not set. CFLAGS
was defaulted to "" early in configure to prevent this. A recent commit
ad9ccf660013c208077b1e983d6c824df25ed1cf ("configure: Fix various new
autotools warnings") added AC_USE_SYSTEM_EXTENSIONS, which pulls in the
autoconf CFLAGS check, before we default CFLAGS and thus setting the
autoconf default for CFLAGS. Move the default setting of CFLAGS to before
AC_USE_SYSTEM_EXTENSIONS so that autoconf will see CFLAGS as set and not
give it a default.

Signed-off-by: Glenn Washburn <>
Reviewed-by: Robbie Harwood <>
Tested-by: Paul Menzel <>
--- | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ b/
index 3ffbc7c57b..c1e50c9d75 100644
--- a/
+++ b/
@@ -36,12 +36,12 @@ dnl description of the relationships between them.
 # We don't want -g -O2 by default in CFLAGS
 : ${CFLAGS=""}
 # Checks for build, host and target systems.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]