From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgcmL-0001kZ-Og for qemu-devel@nongnu.org; Sun, 26 May 2013 11:22:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgcmF-0005Dh-8c for qemu-devel@nongnu.org; Sun, 26 May 2013 11:22:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgcmE-0005DY-WD for qemu-devel@nongnu.org; Sun, 26 May 2013 11:22:31 -0400 Date: Sun, 26 May 2013 18:22:51 +0300 From: "Michael S. Tsirkin" Message-ID: <1369581694-1655-2-git-send-email-mst@redhat.com> References: <1369581694-1655-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369581694-1655-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PATCH v2 01/11] make: pull in linux-headers on all platforms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Maydell Things we pull from linux-headers are actually quite portable. All we need is implement linux/types.h using stdint.h and we are able to compile on any platform. Signed-off-by: Michael S. Tsirkin --- Makefile.target | 5 +++-- configure | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/Makefile.target index ce4391f..5d69d50 100644 --- a/Makefile.target +++ b/Makefile.target @@ -6,9 +6,10 @@ include config-devices.mak include $(SRC_PATH)/rules.mak $(call set-vpath, $(SRC_PATH)) -ifdef CONFIG_LINUX -QEMU_CFLAGS += -I../linux-headers +ifndef CONFIG_LINUX +QEMU_CFLAGS += -I../linux-stubs endif +QEMU_CFLAGS += -I../linux-headers QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H QEMU_CFLAGS+=-I$(SRC_PATH)/include diff --git a/configure b/configure index 5ae7e4a..8321f8b 100755 --- a/configure +++ b/configure @@ -427,6 +427,7 @@ fi # OS specific +QEMU_LINUX_HEADER_INCLUDES="-I\$(SRC_PATH)/linux-stubs -I\$(SRC_PATH)/linux-headers " case $targetos in CYGWIN*) mingw32="yes" @@ -547,10 +548,14 @@ Haiku) if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then audio_possible_drivers="$audio_possible_drivers fmod" fi - QEMU_INCLUDES="-I\$(SRC_PATH)/linux-headers $QEMU_INCLUDES" + QEMU_LINUX_HEADER_INCLUDES="-I\$(SRC_PATH)/linux-headers " ;; esac +#Always pull in linux-headers, we make sure they are +#cross-platform +QEMU_INCLUDES="$QEMU_LINUX_HEADER_INCLUDES$QEMU_INCLUDES" + if [ "$bsd" = "yes" ] ; then if [ "$darwin" != "yes" ] ; then usb="bsd" -- MST