[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Don't use $(CC) for the -std=gnu11 flag
From: |
Christian Biesinger |
Subject: |
Re: [PATCH] Don't use $(CC) for the -std=gnu11 flag |
Date: |
Mon, 18 Nov 2019 16:38:33 -0600 |
On Mon, Nov 18, 2019 at 4:15 PM Bruno Haible <address@hidden> wrote:
>
> Hi Christian,
>
> This patch is not good. In a package where some subdirectories
> use automake and gnulib and other subdirectories don't use Automake,
> it will have the effect that some subdirectories are compiled with
> -std=gnu11 and some without. This is a recipe for hassles.
>
> One such package is GNU libiconv; there probably are others.
>
> > Currently, the std-gnu11 module uses $(CC) to store the
> > compiler flag to enable C11. This has the downside that
> > if someone uses make CC=foo, the flag will be overridden.
>
> A user is not supposed to use
> make CC=some-other-compiler
>
> This works only with packages which don't use autoconfiguration;
> it does not work with gnulib (which has tons of autoconf tests
> whose results depend on $CC).
OK, thanks for the explanation. I will instead fix the GDB build
system to not override $(CC).
Christian