diff options
author | Glenn Washburn <development@efficientek.com> | 2022-04-09 02:29:59 +0000 |
---|---|---|
committer | Daniel Kiper <daniel.kiper@oracle.com> | 2022-04-20 18:29:01 +0200 |
commit | ce89c9708ce13b3c719e24d0aee90039747fec6d (patch) | |
tree | bc993434dc1ea89c85c8ce51f95727346c0221c9 | |
parent | c244e331b9f56f10a67b8b027d6ccab1d45dcadb (diff) | |
download | grub-ce89c9708ce13b3c719e24d0aee90039747fec6d.tar.gz |
configure: Fix default -O2 being added when CFLAGS not set
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 ad9ccf660 (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.
CFLAGS is also moved above AC_CONFIG_AUX_DIR, because CFLAGS should be
defaulted to "" as soon as possible to catch any autoconf macros that try
to use some other default. Regardless, this currently has no effect as that
macro does not consider the CFLAGS variable.
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Robbie Harwood <rharwood@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 94653039c..57fb70945 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 |