diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-02-28 08:37:23 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-02-28 13:22:59 -0500 |
commit | d40f833630a1299fd377408dc8d8fac370d621b0 (patch) | |
tree | 782b4101c646cef0f79b39c0d8a72c45068b69d6 /arch/x86/boot/Makefile | |
parent | 12871c568305a0b20f116315479a18cd46882e9b (diff) |
x86, boot: Restrict CFLAGS for hostprogs
Currently tools/build has access to all the kernel headers in
$(srctree). This is unnecessary and could potentially allow
tools/build to erroneously include kernel headers when it should only
be including userspace-exported headers.
Unfortunately, mkcpustr still needs access to some of the asm kernel
headers, so explicitly special case that hostprog.
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-5-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/Makefile')
-rw-r--r-- | arch/x86/boot/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index 95365a82b6a0..3e02148bb774 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -37,8 +37,9 @@ 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 += $(LINUXINCLUDE) | 40 | HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include |
41 | 41 | HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \ | |
42 | -include $(srctree)/include/linux/kconfig.h | ||
42 | $(obj)/cpu.o: $(obj)/cpustr.h | 43 | $(obj)/cpu.o: $(obj)/cpustr.h |
43 | 44 | ||
44 | quiet_cmd_cpustr = CPUSTR $@ | 45 | quiet_cmd_cpustr = CPUSTR $@ |