[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
- [Qemu-devel] [PATCH v2 00/11] qemu: use virtio linux headers in portable code, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 01/11] make: pull in linux-headers on all platforms,
Michael S. Tsirkin <=
- [Qemu-devel] [PATCH v2 02/11] scripts/update-linux-headers.sh: add virtio, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 03/11] virtio-9p: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 04/11] virtio-net, eth: use linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 05/11] virtio-blk: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 06/11] virtio-balloon: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 07/11] virtio-rng: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 08/11] virtio-console: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 09/11] virtio: add virtio_ids from linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 10/11] virtio-pci: switch to linux-headers, Michael S. Tsirkin, 2013/05/26
- [Qemu-devel] [PATCH v2 11/11] virtio: use ring structure from linux-headers, Michael S. Tsirkin, 2013/05/26