[U-Boot] [PATCH 1/2] Makefile: fix clang warnings due to clang support

Masahiro Yamada yamada.m at jp.panasonic.com
Tue Jun 10 14:20:22 CEST 2014


Hi Jeroen,


On Fri, 30 May 2014 15:45:27 +0200
Jeroen Hofstee <jeroen at 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.


This might be useful information for you.
some discussion why Linux folks added those lines:
https://patchwork.kernel.org/patch/3719881/

Do you also need this to use Clang?
https://patchwork.kernel.org/patch/3720041/


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list