[U-Boot] [RFC 06/10] cc-option: make it work with clang

Albert ARIBAUD albert.u.boot at aribaud.net
Tue Jun 10 10:52:25 CEST 2014


Hi Masahiro,

On Tue, 10 Jun 2014 17:39:03 +0900, Masahiro Yamada
<yamada.m at jp.panasonic.com> wrote:

> Hi Jeroen,
> 
> 
> On Sat, 31 May 2014 22:32:20 +0200
> Jeroen Hofstee <jeroen at myspectrum.nl> wrote:
> 
> > By default clang will return echo a warning if an option is unknown.
> > Therefore turn warnings into errors when polling for options.
> 
> As far as I tested with clang 3.5 on Ubuntu 14.04,
> it looks different.
> 
> $ clang -fno-delete-null-pointer-checks  helloworld.c
> clang: error: unknown argument: '-fno-delete-null-pointer-checks'
> $ echo $?
> 1

Possibly it depends on how the clang/LLVM toolchain in use has been
built and configured. In any case, explicitly turning warnings into
errors fixes those toolchains which only emit warnings for unknown
options, and it won't harm those such as the one above which already
do "the right thing".

> Best Regards
> Masahiro Yamada

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list