aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-03-22 14:08:18 -0400
committerH. Peter Anvin <hpa@zytor.com>2012-03-22 15:42:51 -0400
commit446e1c86d51d0823e003a43a2b85c430efce2733 (patch)
treea51969c3537002c1be427dd1f76a337bc97f87b8 /arch/x86
parent13354dc412c36fe554f9904a92f1268c74af7e87 (diff)
x86, boot: Correct CFLAGS for hostprogs
This is a partial revert of commit: d40f833 "Restrict CFLAGS for hostprogs" The endian-manipulation macros in tools/include need <linux/types.h>, but the hostprogs in arch/x86/boot need several headers from the kernel build tree, which means we have to add the kernel headers to the include path. This picks up <linux/types.h> from the kernel tree, which gives a warning. Since this use of <linux/types.h> is intentional, add -D__EXPORTED_HEADERS__ to the command line to silence the warning. A better way to fix this would be to always install the exported kernel headers into $(objtree)/usr/include as a standard part of the kernel build, but that is a lot more involved. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-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')
-rw-r--r--arch/x86/boot/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 3e02148bb774..5a747dd884db 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -37,9 +37,9 @@ setup-y += video-bios.o
37targets += $(setup-y) 37targets += $(setup-y)
38hostprogs-y := mkcpustr tools/build 38hostprogs-y := mkcpustr tools/build
39 39
40HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include 40HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \
41HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \ 41 -D__EXPORTED_HEADERS__
42 -include $(srctree)/include/linux/kconfig.h 42
43$(obj)/cpu.o: $(obj)/cpustr.h 43$(obj)/cpu.o: $(obj)/cpustr.h
44 44
45quiet_cmd_cpustr = CPUSTR $@ 45quiet_cmd_cpustr = CPUSTR $@