qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 01/11] make: pull in linux-headers on all platfor


From: Michael S. Tsirkin
Subject: [Qemu-devel] [PATCH v2 01/11] make: pull in linux-headers on all platforms
Date: Sun, 26 May 2013 18:22:51 +0300

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 <address@hidden>
---
 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]