[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] configure: Enforce gnu99 C language standard
From: |
Leif Lindholm |
Subject: |
Re: [PATCH 1/3] configure: Enforce gnu99 C language standard |
Date: |
Thu, 2 Apr 2020 18:38:35 +0100 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Apr 02, 2020 at 19:08:21 +0200, Daniel Kiper wrote:
> > > -# Optimization flag. Allow user to override.
> > > +if test "x$BUILD_CFLAGS" = x; then
> > > + BUILD_CFLAGS='-std=gnu99'
> > > +fi
> > > +
> > > +if test "x$HOST_CFLAGS" = x; then
> > > + HOST_CFLAGS='-std=gnu99'
> > > +fi
> > > +
> > > if test "x$TARGET_CFLAGS" = x; then
> > > - TARGET_CFLAGS="$TARGET_CFLAGS -Os"
> > > + TARGET_CFLAGS='-Os -std=gnu99'
> > > fi
> >
> > Do these not add -std=gnu99 only if *_CFLAGS are not specified?
>
> Exactly...
>
> > Would we not want to override these always?
> >
> > For example, Debian/Ubuntu override HOST_CFLAGS when building grub.
>
> I was not sure about it. So, after some thinking I decided to give
> a user a chance to override C language type using *_CFLAGS. However,
> I am not so strongly tied to that. If you think we should add
> "-std=gnu99" unconditionally I am OK with that.
I think we should. As long as we permit overriding *_CFLAGS, and put
the user-provided flags last, that would still permit someone to
override the --std option witn an alternative one. (Works just like
the -O flags.)
/
Leif
[PATCH 3/3] autogen: Replace -iname with -ipath in find command, Daniel Kiper, 2020/04/02