From patchwork Sun May 26 15:22:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 246398 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC6052C0209 for ; Mon, 27 May 2013 01:23:15 +1000 (EST) Received: from localhost ([::1]:55099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugcmw-0001l3-5U for incoming@patchwork.ozlabs.org; Sun, 26 May 2013 11:23:14 -0400 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 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4QFMTuR017756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 26 May 2013 11:22:29 -0400 Received: from redhat.com (vpn-202-184.tlv.redhat.com [10.35.202.184]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id r4QFMRfM019051; Sun, 26 May 2013 11:22:27 -0400 Date: Sun, 26 May 2013 18:22:51 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org 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-Disposition: inline In-Reply-To: <1369581694-1655-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , Peter Maydell Subject: [Qemu-devel] [PATCH v2 01/11] make: pull in linux-headers on all platforms X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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"