From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <dkiper@net-space.pl>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH] configure: Fix default -O2 being added when CFLAGS not set
Date: Thu, 24 Mar 2022 17:31:16 -0500 [thread overview]
Message-ID: <20220324223116.3222258-1-development@efficientek.com> (raw)
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
next reply other threads:[~2022-03-24 22:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 22:31 Glenn Washburn [this message]
2022-03-25 6:53 ` [PATCH] configure: Fix default -O2 being added when CFLAGS not set Paul Menzel
2022-03-28 16:14 ` Glenn Washburn
2022-03-25 15:54 ` Robbie Harwood
2022-03-28 15:53 ` Glenn Washburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220324223116.3222258-1-development@efficientek.com \
--to=development@efficientek.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.