From: Masahiro Yamada Date: Tue, 10 Jun 2014 21:20:22 +0900 Subject: [U-Boot] [PATCH 1/2] Makefile: fix clang warnings due to clang support In-Reply-To: <1401457528-13709-2-git-send-email-jeroen@myspectrum.nl> References: <1401457528-13709-1-git-send-email-jeroen@myspectrum.nl> <1401457528-13709-2-git-send-email-jeroen@myspectrum.nl> Message-ID: <20140610212021.961F.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jeroen, On Fri, 30 May 2014 15:45:27 +0200 Jeroen Hofstee 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