[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] configure: Fix default -O2 being added when CFLAGS not se
From: |
Daniel Kiper |
Subject: |
Re: [PATCH v2] configure: Fix default -O2 being added when CFLAGS not set |
Date: |
Wed, 6 Apr 2022 17:23:28 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Mar 28, 2022 at 12:56:22PM -0500, Glenn Washburn wrote:
> 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 <development@efficientek.com>
> Reviewed-by: Robbie Harwood <rharwood@redhat.com>
> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> 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])
I am OK with this change but I think AC_CONFIG_AUX_DIR macro move also
requires at least one sentence explanation in the commit message.
Daniel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2] configure: Fix default -O2 being added when CFLAGS not set,
Daniel Kiper <=