[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] configure: Fix default -O2 being added when CFLAGS not set
From: |
Glenn Washburn |
Subject: |
[PATCH] configure: Fix default -O2 being added when CFLAGS not set |
Date: |
Thu, 24 Mar 2022 17:31:16 -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. Apparently something
changed in autoconf and now AC_USE_SYSTEM_EXTENSIONS, which is before the
default setting of CFLAGS, will pull in this check. Move the default
setting of CFLAGS to before this so that if will see CFLAGS as set and not
give it a default.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
configure.ac | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3ffbc7c57b..c1e50c9d75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,12 +36,12 @@ dnl description of the relationships between them.
AC_INIT([GRUB],[2.11],[bug-grub@gnu.org])
-AC_USE_SYSTEM_EXTENSIONS
-AC_CONFIG_AUX_DIR([build-aux])
-
# We don't want -g -O2 by default in CFLAGS
: ${CFLAGS=""}
+AC_USE_SYSTEM_EXTENSIONS
+AC_CONFIG_AUX_DIR([build-aux])
+
# Checks for build, host and target systems.
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
--
2.27.0
- [PATCH] configure: Fix default -O2 being added when CFLAGS not set,
Glenn Washburn <=