All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leif Lindholm <leif@nuviainc.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: grub-devel@gnu.org, javierm@redhat.com, olaf@aepfle.de,
	phcoder@gmail.com, pjones@redhat.com
Subject: Re: [PATCH 1/3] configure: Enforce gnu99 C language standard
Date: Thu, 2 Apr 2020 18:38:35 +0100	[thread overview]
Message-ID: <20200402173835.GR7468@vanye> (raw)
In-Reply-To: <20200402170821.zxs3cl43g6tsxcy2@tomti.i.net-space.pl>

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


  parent reply	other threads:[~2020-04-02 17:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 15:07 [PATCH 0/3] Various build and doc fixes Daniel Kiper
2020-04-02 15:07 ` [PATCH 1/3] configure: Enforce gnu99 C language standard Daniel Kiper
2020-04-02 16:28   ` Leif Lindholm
2020-04-02 17:08     ` Daniel Kiper
2020-04-02 17:13       ` Eli Schwartz
2020-04-02 17:38       ` Leif Lindholm [this message]
2020-04-02 22:03         ` Mike Gilbert
2020-04-02 15:07 ` [PATCH 2/3] INSTALL/configure: Update install doc and configure comment Daniel Kiper
2020-04-02 15:07 ` [PATCH 3/3] autogen: Replace -iname with -ipath in find command Daniel Kiper

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=20200402173835.GR7468@vanye \
    --to=leif@nuviainc.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    --cc=javierm@redhat.com \
    --cc=olaf@aepfle.de \
    --cc=phcoder@gmail.com \
    --cc=pjones@redhat.com \
    /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.