Skip to content
Commit 446e1c86 authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

x86, boot: Correct CFLAGS for hostprogs

This is a partial revert of commit:
    d40f8336

 "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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Acked-by: default avatarMatt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1330436245-24875-5-git-send-email-matt@console-pimps.org
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 13354dc4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment