diff options
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | arch/cris/Makefile | 4 | ||||
-rw-r--r-- | arch/um/Makefile | 4 | ||||
-rw-r--r-- | arch/x86/boot/Makefile | 4 | ||||
-rw-r--r-- | arch/x86/boot/mkcpustr.c | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mkcapflags.pl | 5 |
7 files changed, 30 insertions, 9 deletions
@@ -350,12 +350,22 @@ AFLAGS_KERNEL = | |||
350 | CFLAGS_GCOV = -fprofile-arcs -ftest-coverage | 350 | CFLAGS_GCOV = -fprofile-arcs -ftest-coverage |
351 | 351 | ||
352 | 352 | ||
353 | # Use USERINCLUDE when you must reference the UAPI directories only. | ||
354 | USERINCLUDE := \ | ||
355 | -I$(srctree)/arch/$(hdr-arch)/include/uapi \ | ||
356 | -Iarch/$(hdr-arch)/include/generated/uapi \ | ||
357 | -I$(srctree)/include/uapi \ | ||
358 | -Iinclude/generated/uapi \ | ||
359 | -include $(srctree)/include/linux/kconfig.h | ||
360 | |||
353 | # Use LINUXINCLUDE when you must reference the include/ directory. | 361 | # Use LINUXINCLUDE when you must reference the include/ directory. |
354 | # Needed to be compatible with the O= option | 362 | # Needed to be compatible with the O= option |
355 | LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \ | 363 | LINUXINCLUDE := \ |
356 | -Iarch/$(hdr-arch)/include/generated -Iinclude \ | 364 | -I$(srctree)/arch/$(hdr-arch)/include \ |
357 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ | 365 | -Iarch/$(hdr-arch)/include/generated \ |
358 | -include $(srctree)/include/linux/kconfig.h | 366 | $(if $(KBUILD_SRC), -I$(srctree)/include) \ |
367 | -Iinclude \ | ||
368 | $(USERINCLUDE) | ||
359 | 369 | ||
360 | KBUILD_CPPFLAGS := -D__KERNEL__ | 370 | KBUILD_CPPFLAGS := -D__KERNEL__ |
361 | 371 | ||
diff --git a/arch/cris/Makefile b/arch/cris/Makefile index 29c2ceb38a76..39dc7d00083e 100644 --- a/arch/cris/Makefile +++ b/arch/cris/Makefile | |||
@@ -23,7 +23,9 @@ mach-$(CONFIG_ETRAXFS) := fs | |||
23 | 23 | ||
24 | ifneq ($(arch-y),) | 24 | ifneq ($(arch-y),) |
25 | SARCH := arch-$(arch-y) | 25 | SARCH := arch-$(arch-y) |
26 | inc := -Iarch/cris/include/$(SARCH) | 26 | inc := -Iarch/cris/include/uapi/$(SARCH) |
27 | inc += -Iarch/cris/include/$(SARCH) | ||
28 | inc += -Iarch/cris/include/uapi/$(SARCH)/arch | ||
27 | inc += -Iarch/cris/include/$(SARCH)/arch | 29 | inc += -Iarch/cris/include/$(SARCH)/arch |
28 | else | 30 | else |
29 | SARCH := | 31 | SARCH := |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 097091059aaa..133f7de2a13d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -66,7 +66,9 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ | |||
66 | include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) | 66 | include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) |
67 | 67 | ||
68 | KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ | 68 | KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ |
69 | -I$(HOST_DIR)/include/generated | 69 | -I$(srctree)/$(HOST_DIR)/include/uapi \ |
70 | -I$(HOST_DIR)/include/generated \ | ||
71 | -I$(HOST_DIR)/include/generated/uapi | ||
70 | 72 | ||
71 | # -Derrno=kernel_errno - This turns all kernel references to errno into | 73 | # -Derrno=kernel_errno - This turns all kernel references to errno into |
72 | # kernel_errno to separate them from the libc errno. This allows -fno-common | 74 | # kernel_errno to separate them from the libc errno. This allows -fno-common |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index f7535bedc33f..ce03476d8c8f 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -37,7 +37,7 @@ setup-y += video-bios.o | |||
37 | targets += $(setup-y) | 37 | targets += $(setup-y) |
38 | hostprogs-y := mkcpustr tools/build | 38 | hostprogs-y := mkcpustr tools/build |
39 | 39 | ||
40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \ | 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(USERINCLUDE) \ |
41 | -D__EXPORTED_HEADERS__ | 41 | -D__EXPORTED_HEADERS__ |
42 | 42 | ||
43 | $(obj)/cpu.o: $(obj)/cpustr.h | 43 | $(obj)/cpu.o: $(obj)/cpustr.h |
@@ -52,7 +52,7 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE | |||
52 | 52 | ||
53 | # How to compile the 16-bit code. Note we always compile for -march=i386, | 53 | # How to compile the 16-bit code. Note we always compile for -march=i386, |
54 | # that way we can complain to the user if the CPU is insufficient. | 54 | # that way we can complain to the user if the CPU is insufficient. |
55 | KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ | 55 | KBUILD_CFLAGS := $(USERINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \ |
56 | -DDISABLE_BRANCH_PROFILING \ | 56 | -DDISABLE_BRANCH_PROFILING \ |
57 | -Wall -Wstrict-prototypes \ | 57 | -Wall -Wstrict-prototypes \ |
58 | -march=i386 -mregparm=3 \ | 58 | -march=i386 -mregparm=3 \ |
diff --git a/arch/x86/boot/mkcpustr.c b/arch/x86/boot/mkcpustr.c index 919257f526f2..4579eff0ef4d 100644 --- a/arch/x86/boot/mkcpustr.c +++ b/arch/x86/boot/mkcpustr.c | |||
@@ -15,6 +15,8 @@ | |||
15 | 15 | ||
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | 17 | ||
18 | #include "../include/asm/required-features.h" | ||
19 | #include "../include/asm/cpufeature.h" | ||
18 | #include "../kernel/cpu/capflags.c" | 20 | #include "../kernel/cpu/capflags.c" |
19 | 21 | ||
20 | int main(void) | 22 | int main(void) |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 16cae425d1f8..8c297aa53eef 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -4,7 +4,9 @@ | |||
4 | #ifndef _ASM_X86_CPUFEATURE_H | 4 | #ifndef _ASM_X86_CPUFEATURE_H |
5 | #define _ASM_X86_CPUFEATURE_H | 5 | #define _ASM_X86_CPUFEATURE_H |
6 | 6 | ||
7 | #ifndef _ASM_X86_REQUIRED_FEATURES_H | ||
7 | #include <asm/required-features.h> | 8 | #include <asm/required-features.h> |
9 | #endif | ||
8 | 10 | ||
9 | #define NCAPINTS 10 /* N 32-bit words worth of info */ | 11 | #define NCAPINTS 10 /* N 32-bit words worth of info */ |
10 | 12 | ||
diff --git a/arch/x86/kernel/cpu/mkcapflags.pl b/arch/x86/kernel/cpu/mkcapflags.pl index c7b3fe2d72e0..091972ef49de 100644 --- a/arch/x86/kernel/cpu/mkcapflags.pl +++ b/arch/x86/kernel/cpu/mkcapflags.pl | |||
@@ -8,7 +8,10 @@ | |||
8 | open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; | 8 | open(IN, "< $in\0") or die "$0: cannot open: $in: $!\n"; |
9 | open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; | 9 | open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n"; |
10 | 10 | ||
11 | print OUT "#include <asm/cpufeature.h>\n\n"; | 11 | print OUT "#ifndef _ASM_X86_CPUFEATURE_H\n"; |
12 | print OUT "#include <asm/cpufeature.h>\n"; | ||
13 | print OUT "#endif\n"; | ||
14 | print OUT "\n"; | ||
12 | print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; | 15 | print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n"; |
13 | 16 | ||
14 | %features = (); | 17 | %features = (); |