From: Michal Marek Date: Thu, 8 Jan 2015 15:16:39 +0000 (+0100) Subject: Makefile: include arch/*/include/generated/uapi before .../generated X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=90ac086bca10;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Makefile: include arch/*/include/generated/uapi before .../generated The introduction of the uapi directories in v3.7-rc1 moved some of the generated headers from arch/*/include/generated to the uapi directory, keeping the #include directives intact. This creates a problem when bisecting, because the unversioned files are not cleaned automatically by git and the compiler might include stale headers as a result. Instead of cleaning them in the Makefiles, promote arch/*/include/generated/uapi in the search path. Under normal circumstances, there is no overlap between this uapi subdirectory and its parent, so the include choices remain the same. We keep arch/*/include/generated/uapi in the USERINCLUDE variable so that it is usable standalone. Note that we cannot completely swap the order of the uapi and kernel-only directories, since the headers in include/uapi/asm-generic are meant to be wrapped by their include/asm-generic counterparts when building kernel code. Reported-by: "Nicholas A. Bellinger" Reported-by: David Drysdale Signed-off-by: Michal Marek Signed-off-by: Linus Torvalds --- diff --git a/Makefile b/Makefile index eb4eca56843a..87f0c052b0ac 100644 --- a/Makefile +++ b/Makefile @@ -391,6 +391,7 @@ USERINCLUDE := \ # Needed to be compatible with the O= option LINUXINCLUDE := \ -I$(srctree)/arch/$(hdr-arch)/include \ + -Iarch/$(hdr-arch)/include/generated/uapi \ -Iarch/$(hdr-arch)/include/generated \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ -Iinclude \