public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] Makefile: fix clang warnings due to clang support
Date: Tue, 10 Jun 2014 20:24:56 +0200	[thread overview]
Message-ID: <1402424696.2437.28.camel@yellow> (raw)
In-Reply-To: <20140610212021.961F.AA925319@jp.panasonic.com>

Hello Masahiro,

On di, 2014-06-10 at 21:20 +0900, Masahiro Yamada wrote:
> Hi Jeroen,
> 
> 
> On Fri, 30 May 2014 15:45:27 +0200
> Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> 
> > Building u-boot tools with clang as a host compiler e.g. on
> > FreeBSD with `gmake HOSTCC=clang CONFIG_USE_PRIVATE_LIBGCC=y tools`
> > leads to many warnings [1] for every compiler invocation since
> > commit 598e2d33. Part of mentioned commit imports linux patches:
> > 
> >  - kbuild: LLVMLinux: Adapt warnings for compilation with clang
> >  - kbuild: LLVMLinux: Add Kbuild support for building kernel with Clang
> > 
> > No version of clang supports the gcc fno-delete-null-pointer-checks
> > though, but it is only passed to clang. Gcc does not have the clang
> > specific Qunused-arguments for the target. Furthermore several
> > warnings are disabled which aren't encountered in u-boot. Since such
> > a build has worked for quite some time and works after removing these
> > changes, just remove the clang specific handling to restore normal
> > building with clang as hostcc.
> 
> 
> 
> I have to admit I just copied these line from Kernel
> without testing it, just for syncing with Kernel makefiles.
> 
> 
> As far as I tested, Clang did not recognize 
> -fno-delete-null-pointer-checks.
> 
> It is OK with me if you rip Clang stuff off the top Makefile.
> 
> Sorry, honestly I am not familiar enough with Clang
> to make deeper review.

yup, it should be removed.. since with clang 3.5 trunk it actually
errors. You should be able to verify it without cross target support
with:

`make CC="clang -no-integrated-as" HOSTCC="clang -no-integrated-as"
HOST_TOOLS_ALL=y sandbox_config tools`

and you get (with clang 3.5) "clang: error: unknown argument:
'-fno-delete-null-pointer-checks'" (and yes the commit mentions warns,
which more then likely is the case for clang 3.3 / 3.4). Undoing the
Linux clang additions (as this patch does) makes the build work again.

Since there is no target clang support in U-boot at the moment the
target warnings suppression can be removed as well, since it is just
dead code at the moment and I would like to see how far we can get with
actually fixing warnings, not blindly silencing them...

Regards,
Jeroen

  reply	other threads:[~2014-06-10 18:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-30 13:45 [U-Boot] [PATCH 0/2] fix building tools on FreeBSD/clang Jeroen Hofstee
2014-05-30 13:45 ` [U-Boot] [PATCH 1/2] Makefile: fix clang warnings due to clang support Jeroen Hofstee
2014-06-10 12:20   ` Masahiro Yamada
2014-06-10 18:24     ` Jeroen Hofstee [this message]
2014-06-11 22:17   ` [U-Boot] [U-Boot, " Tom Rini
2014-05-30 13:45 ` [U-Boot] [PATCH 2/2] tools: include u-boot version of sha256.h Jeroen Hofstee
2014-06-03 14:11   ` Simon Glass
2014-06-03 18:27     ` Jeroen Hofstee
2014-06-11 22:17   ` [U-Boot] [U-Boot, " Tom Rini

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=1402424696.2437.28.camel@yellow \
    --to=jeroen@myspectrum.nl \
    --cc=u-boot@lists.denx.de \
    /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