diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-06-15 17:45:43 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2016-07-18 21:31:35 +0200 |
commit | b999596b963a6635c153e3d2b3d5bb28b5c45027 (patch) | |
tree | 6568c20b6254cd56c86f5b0595693957b8b595c3 /Makefile | |
parent | 5ee02af153661ed98b5ccdfb984d78e7a8881b56 (diff) | |
download | linux-b999596b963a6635c153e3d2b3d5bb28b5c45027.tar.bz2 |
Kbuild: don't add ../../ to include path
When we build with O=objdir and objdir is directly below the source tree,
$(srctree) becomes '..'.
When a Makefile adds a CFLAGS option like -Ipath/to/headers and
we are building with a separate object directory, Kbuild tries to
add two -I options, one for the source tree and one for the object
tree. An absolute path is treated as a special case, and don't add
this one twice. This also normally catches -I$(srctree)/$(src)
as $(srctree) usually is an absolute directory like /home/arnd/linux/.
The combination of the two behaviors however results in an invalid
path name to be included: we get both ../$(src) and ../../$(src),
the latter one pointing outside of the source tree, usually to a
nonexisting directory. Building with 'make W=1' makes this obvious:
cc1: error: ../../arch/arm/mach-s3c24xx/include: No such file or directory [-Werror=missing-include-dirs]
This adds another special case, treating path names starting with ../
like those starting with / so we don't try to prefix that with
$(srctree).
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions