From: Segher Boessenkool <segher@kernel.crashing.org>
To: Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
Behan Webster <behanw@converseincode.com>,
dl9pf@gmx.de, Mark Charlebois <charlebm@gmail.com>,
Matthias Kaehlcke <mka@chromium.org>,
Greg Hackmann <ghackmann@google.com>,
Michael Davidson <md@google.com>, Michal Marek <mmarek@suse.com>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
llvmlinux@lists.linuxfoundation.org
Subject: Re: [PATCH] kbuild: clang: remove crufty HOSTCFLAGS
Date: Sat, 30 Sep 2017 19:38:53 -0500 [thread overview]
Message-ID: <20171001003853.GX8421@gate.crashing.org> (raw)
In-Reply-To: <20170930231450.cggvysrt4zedsbkq@lostoracle.net>
On Sat, Sep 30, 2017 at 04:14:50PM -0700, Nick Desaulniers wrote:
> On Thu, Sep 28, 2017 at 07:52:35PM +0900, Masahiro Yamada wrote:
> > 2017-09-26 11:28 GMT+09:00 Nick Desaulniers <nick.desaulniers@gmail.com>:
> > > HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
> > > + $(call hostcc-option,-fno-delete-null-pointer-checks) \
> > > -fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
> >
> > You call hostcc-option
> > before Kbuild.include is included around line 341.
> >
> > So, $(call hostcc-option, ...) returns always an empty string here
> > whether the compiler supports the option or not.
>
> So calling a yet-to-be defined variable results in an empty string
> rather than a loud failure? Chalk that up there with language features
> no one ever asked for. That kind of implicit conversion gets languages
> like JavaScript (with its loose type system, not that C is without its
> own implicit type conversions/promotions) in a lot of hot water.
make --warn-undefined-variables
(and it warns all over the place during a kernel build -- having undefined
variables expand to the empty string is a useful feature, too, not just a
trap for the unwary).
Segher
next prev parent reply other threads:[~2017-10-01 0:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 2:28 [PATCH] kbuild: clang: remove crufty HOSTCFLAGS Nick Desaulniers
2017-09-28 10:52 ` Masahiro Yamada
2017-09-30 23:14 ` Nick Desaulniers
2017-10-01 0:38 ` Segher Boessenkool [this message]
2017-10-05 20:15 ` Masahiro Yamada
2017-10-07 20:23 ` [PATCH v2] " Nick Desaulniers
2017-10-07 20:26 ` Nick Desaulniers
2017-10-12 0:56 ` Masahiro Yamada
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=20171001003853.GX8421@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=behanw@converseincode.com \
--cc=charlebm@gmail.com \
--cc=dl9pf@gmx.de \
--cc=ghackmann@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvmlinux@lists.linuxfoundation.org \
--cc=md@google.com \
--cc=mka@chromium.org \
--cc=mmarek@suse.com \
--cc=nick.desaulniers@gmail.com \
--cc=yamada.masahiro@socionext.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox