linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <hpa@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	torvalds@linux-foundation.org, tglx@linutronix.de,
	matt.fleming@intel.com
Subject: [tip:x86/urgent] x86, boot: Correct CFLAGS for hostprogs
Date: Thu, 22 Mar 2012 14:26:24 -0700	[thread overview]
Message-ID: <tip-446e1c86d51d0823e003a43a2b85c430efce2733@git.kernel.org> (raw)
In-Reply-To: <1330436245-24875-5-git-send-email-matt@console-pimps.org>

Commit-ID:  446e1c86d51d0823e003a43a2b85c430efce2733
Gitweb:     http://git.kernel.org/tip/446e1c86d51d0823e003a43a2b85c430efce2733
Author:     H. Peter Anvin <hpa@zytor.com>
AuthorDate: Thu, 22 Mar 2012 11:08:18 -0700
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 22 Mar 2012 12:42:51 -0700

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>
---
 arch/x86/boot/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 3e02148..5a747dd 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -37,9 +37,9 @@ setup-y		+= video-bios.o
 targets		+= $(setup-y)
 hostprogs-y	:= mkcpustr tools/build
 
-HOSTCFLAGS_mkcpustr.o := -I$(srctree)/arch/$(SRCARCH)/include
-HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/tools/include \
-                   -include $(srctree)/include/linux/kconfig.h
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include $(LINUXINCLUDE) \
+	            -D__EXPORTED_HEADERS__
+
 $(obj)/cpu.o: $(obj)/cpustr.h
 
 quiet_cmd_cpustr = CPUSTR  $@

  parent reply	other threads:[~2012-03-22 21:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 13:37 [RFC][PATCH 0/6] Add endian functions to tools/include Matt Fleming
2012-02-28 13:37 ` [RFC][PATCH 1/6] tools/include: Add byteshift headers for endian access Matt Fleming
2012-02-28 19:23   ` [tip:x86/build] " tip-bot for Matt Fleming
2012-02-28 13:37 ` [RFC][PATCH 2/6] x86, relocs: Don't open code put_unaligned_le32() Matt Fleming
2012-02-28 19:23   ` [tip:x86/build] " tip-bot for Matt Fleming
2012-02-28 13:37 ` [RFC][PATCH 3/6] x86, mkpiggy: " Matt Fleming
2012-02-28 19:24   ` [tip:x86/build] " tip-bot for Matt Fleming
2012-02-28 13:37 ` [RFC][PATCH 4/6] x86, boot: Restrict CFLAGS for hostprogs Matt Fleming
2012-02-28 19:25   ` [tip:x86/build] " tip-bot for Matt Fleming
2012-03-22 21:26   ` tip-bot for H. Peter Anvin [this message]
2012-02-28 13:37 ` [RFC][PATCH 5/6] x86, efi: Fix endian issues and unaligned accesses Matt Fleming
2012-02-28 19:26   ` [tip:x86/build] " tip-bot for Matt Fleming
2012-02-28 23:52   ` [RFC][PATCH 5/6] " Stephen Rothwell
2012-02-29  0:13     ` Stephen Rothwell
2012-02-29  0:28       ` Stephen Rothwell
2012-02-29  8:04         ` Stephen Rothwell
2012-02-29  7:49       ` [tip:x86/build] x86, tools: Remove unneeded header files from tools/build.c tip-bot for H. Peter Anvin
2012-02-29  7:50       ` [tip:x86/build] x86, build: Fix portability issues when cross-building tip-bot for H. Peter Anvin
2012-02-28 13:37 ` [RFC][PATCH 6/6] USB: ffs-test: Don't duplicate {get,put}_unaligned*() functions Matt Fleming
2012-02-28 17:50   ` H. Peter Anvin
2012-02-28 17:58     ` Greg Kroah-Hartman
2012-02-28 19:25     ` Davidlohr Bueso
2012-02-28 19:27   ` [tip:x86/build] USB: ffs-test: Don't duplicate {get, put}_unaligned*() functions tip-bot for Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-446e1c86d51d0823e003a43a2b85c430efce2733@git.kernel.org \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).