[lkml]   [2015]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] Makefile: Fix detection of clang when cross-compiling
On Fri, Apr 17, 2015 at 11:35:04PM +0200, Paul Cercueil wrote:
> When the host's C compiler is clang, and when attempting to
> cross-compile Linux e.g. to MIPS with mipsel-linux-gcc, the Makefile
> would incorrectly detect the use of clang, which resulted in
> clang-specific flags being passed to mipsel-linux-gcc.
> This can be verified under Debian by installing the "clang" package,
> and then using it as the default compiler with:
> sudo update-alternatives --config cc
> This patch moves the detection of clang after the $(CC) variable is
> initialized to the name of the cross-compiler, so that the check applies
> to the cross-compiler and not the host's C compiler.
> v2: Move the detection of clang after the inclusion of the
> arch/*/Makefile (as they might set $(CROSS_COMPILE))
> Signed-off-by: Paul Cercueil <>

Applied to kbuild.git#kbuild. I will push it after v4.1-rc1 becomes
available, though.


 \ /
  Last update: 2015-04-22 16:41    [W:0.127 / U:5.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site