kbuild: Fix clang detection
authorMichal Marek <mmarek@suse.com>
Wed, 19 Aug 2015 15:36:41 +0000 (17:36 +0200)
committerMichal Marek <mmarek@suse.com>
Fri, 4 Sep 2015 11:14:10 +0000 (13:14 +0200)
We cannot detect clang before including the arch Makefile, because that
can set the default cross compiler. We also cannot detect clang after
including the arch Makefile, because powerpc wants to know about clang.
Solve this by using an deferred variable. This costs us a few shell
invocations, but this is only a constant number.

Reported-by: Behan Webster <behanw@converseincode.com>
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
Makefile
arch/powerpc/Makefile
scripts/Kbuild.include
scripts/Makefile.extrawarn

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge