diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-06-15 11:45:45 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-07-18 15:31:35 -0400 |
commit | 3308b28569ba3327419658edd194a967e3fd51e2 (patch) | |
tree | 1cfececb58f0640f42ae6a009724e0eeae28ca6e /Makefile | |
parent | dc33db7c338e1a7a4a7cb94d73745c8ca54b1ac8 (diff) |
Kbuild: always prefix objtree in LINUXINCLUDE
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>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -375,19 +375,19 @@ CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,) | |||
375 | # Use USERINCLUDE when you must reference the UAPI directories only. | 375 | # Use USERINCLUDE when you must reference the UAPI directories only. |
376 | USERINCLUDE := \ | 376 | USERINCLUDE := \ |
377 | -I$(srctree)/arch/$(hdr-arch)/include/uapi \ | 377 | -I$(srctree)/arch/$(hdr-arch)/include/uapi \ |
378 | -Iarch/$(hdr-arch)/include/generated/uapi \ | 378 | -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \ |
379 | -I$(srctree)/include/uapi \ | 379 | -I$(srctree)/include/uapi \ |
380 | -Iinclude/generated/uapi \ | 380 | -I$(objtree)/include/generated/uapi \ |
381 | -include $(srctree)/include/linux/kconfig.h | 381 | -include $(srctree)/include/linux/kconfig.h |
382 | 382 | ||
383 | # Use LINUXINCLUDE when you must reference the include/ directory. | 383 | # Use LINUXINCLUDE when you must reference the include/ directory. |
384 | # Needed to be compatible with the O= option | 384 | # Needed to be compatible with the O= option |
385 | LINUXINCLUDE := \ | 385 | LINUXINCLUDE := \ |
386 | -I$(srctree)/arch/$(hdr-arch)/include \ | 386 | -I$(srctree)/arch/$(hdr-arch)/include \ |
387 | -Iarch/$(hdr-arch)/include/generated/uapi \ | 387 | -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \ |
388 | -Iarch/$(hdr-arch)/include/generated \ | 388 | -I$(objtree)/arch/$(hdr-arch)/include/generated \ |
389 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 389 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
390 | -Iinclude | 390 | -I$(objtree)/include |
391 | 391 | ||
392 | LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE)) | 392 | LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE)) |
393 | 393 | ||