kbuild: search arch/$ARCH/include before include/

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, December 17, 2009 - 9:59 am

Gitweb:     http://git.kernel.org/linus/24a675e8b86bef077e549a5ea2c6936989be4815
Commit:     24a675e8b86bef077e549a5ea2c6936989be4815
Parent:     4a2ff67c88211026afcbdbc190c13f705dae1b59
Author:     Sam Ravnborg <sam@ravnborg.org>
AuthorDate: Sat Oct 17 21:14:18 2009 +0200
Committer:  Michal Marek <mmarek@suse.cz>
CommitDate: Sat Dec 12 13:08:13 2009 +0100

    kbuild: search arch/$ARCH/include before include/
    
    The namespace used in arch/$ARCH/include is different from
    what is used in include/ except for the include/asm directory.
    
    This patch gives the arch/$ARCH/include/asm directory priority
    over include/asm.
    
    When we add asm-offsets.h to arch/$ARCH/include/asm/ this
    patch makes sure we pick up the arch specific version
    and not the one we have in include/asm.
    
    The situation with an asm-offsets.h file located in
    both include/asm _and_ arch/$ARCH/include/asm will happen
    when we move more files over to include/generated.
    
    This happens because in some cases it is not practical
    to rename all users so we simply add a file
    in arch/$ARCH/include/asm that includes the generated version.
    
    This is the solution we use for asm-offsets.h as an example.
    
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 Makefile |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 33d4732..0771178 100644
--- a/Makefile
+++ b/Makefile
@@ -334,9 +334,8 @@ CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage
 
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
-LINUXINCLUDE    := -Iinclude \
+LINUXINCLUDE    := -I$(srctree)/arch/$(hdr-arch)/include -Iinclude \
                    $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
-                   -I$(srctree)/arch/$(hdr-arch)/include               \
                    -include include/linux/autoconf.h
 
 KBUILD_CPPFLAGS := -D__KERNEL__
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kbuild: search arch/$ARCH/include before include/, Linux Kernel Mailing ..., (Thu Dec 17, 9:59 am)