Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423172
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 03/11] Kbuild: always prefix objtree in LINUXINCLUDE |
| Date | 2016-06-15 17:50 +0200 |
| Message-ID | <rKleP-4pE-57@gated-at.bofh.it> (permalink) |
| References | <rKleN-4pE-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When $(LINUXINCLUDE) is added to the cflags of a target that
normall doesn't have it (e.g. HOSTCFLAGS), each entry in the
list is expanded so that we search both $(objtree) and $(srctree),
which is a bit silly, as we already know which of the two we
want for each entry in LINUXINCLUDE.
Also, a follow-up patch changes the behavior so we only look in
$(srctree) for manually added include path, and that breaks finding
the generated headers.
This adds an explicit $(objtree) for each tree that we want to
look for generated files.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Makefile | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 45159861e645..969924783543 100644
--- a/Makefile
+++ b/Makefile
@@ -377,19 +377,19 @@ CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
-I$(srctree)/arch/$(hdr-arch)/include/uapi \
- -Iarch/$(hdr-arch)/include/generated/uapi \
+ -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \
-I$(srctree)/include/uapi \
- -Iinclude/generated/uapi \
+ -I$(objtree)/include/generated/uapi \
-include $(srctree)/include/linux/kconfig.h
# Use LINUXINCLUDE when you must reference the include/ directory.
# 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 \
+ -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \
+ -I$(objtree)/arch/$(hdr-arch)/include/generated \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
- -Iinclude
+ -I$(objtree)/include
LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE))
--
2.9.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/11] Kbuild: fix -Wmissing-include-path warnings Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 11/11] [EXPERIMENTAL] Kbuild: enable -Wmissing-include-dirs by default Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 05/11] Kbuild: don't add obj tree in additional includes Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 01/11] Kbuild: don't add ../../ to include path Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 08/11] drm: amd: remove broken include path Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 03/11] Kbuild: always prefix objtree in LINUXINCLUDE Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200 [PATCH v2 02/11] Kbuild: avoid duplicate include path Arnd Bergmann <arnd@arndb.de> - 2016-06-15 17:50 +0200
csiph-web