From patchwork Wed Jun 11 14:29:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 31765 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9AF1B2054B for ; Wed, 11 Jun 2014 14:31:29 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id eb12sf18578476oac.3 for ; Wed, 11 Jun 2014 07:31:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=0nFQfV3CGv5/SPle7Z6+EB9en+03c9Jlu2fxTL99oc8=; b=egg56zJYz4W2OniiJwe0uKEgWBECVxt/AdZbSITG1rgq6LVGm+M6hrADDG5CzSjTaC r2Bib1SoW+afdDi4NHhQ3Ej2AG1OZOdqzjvcDHebqIMb2RoERV5hXbaiprsfiW/gixC3 HCNydtUhg0b9N0wgqpEc8UrweqW1nPUluNoODMGaX5HK4OjHRE9TSuzlMuDiriKB5/Zn GTWrznKvY52YhlxaOfwjbFaxYRUiKMAVJSPQ5fRYkrjbNFzfyk9nVRbSrhkt+JWekXfl Nz5OpwbNQ8FYSx5eZ6cA0ZJY2ZcOETbqkaDIprTUd3qGdTo7RIHh8d9StwdiHZnjGwk0 Tlgw== X-Gm-Message-State: ALoCoQnLKb8LMinvhvLnucpZ3W4wiL1c6P/9ks97O0K9L6Qa8H2lZRWMXg0Fm0jfvvOv7MrTRGmm X-Received: by 10.43.126.130 with SMTP id gw2mr18475401icc.15.1402497089190; Wed, 11 Jun 2014 07:31:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.46 with SMTP id k43ls2549555qgk.58.gmail; Wed, 11 Jun 2014 07:31:29 -0700 (PDT) X-Received: by 10.52.100.3 with SMTP id eu3mr752320vdb.68.1402497089031; Wed, 11 Jun 2014 07:31:29 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id k3si13026597vcg.20.2014.06.11.07.31.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 07:31:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jz11so7030519veb.17 for ; Wed, 11 Jun 2014 07:31:29 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr84312vec.80.1402497088952; Wed, 11 Jun 2014 07:31:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp308434vcb; Wed, 11 Jun 2014 07:31:28 -0700 (PDT) X-Received: by 10.140.47.72 with SMTP id l66mr12196398qga.48.1402497088258; Wed, 11 Jun 2014 07:31:28 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t52si30815817qge.7.2014.06.11.07.31.28 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 11 Jun 2014 07:31:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:46814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujYl-0006G0-R3 for patch@linaro.org; Wed, 11 Jun 2014 10:31:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXS-0004rX-JW for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WujXR-0008Pn-Ij for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:06 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WujXR-0008DN-CU for qemu-devel@nongnu.org; Wed, 11 Jun 2014 10:30:05 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WujXF-00075m-Ul; Wed, 11 Jun 2014 15:29:53 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 11 Jun 2014 15:29:46 +0100 Message-Id: <1402496993-27206-9-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> References: <1402496993-27206-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl Subject: [Qemu-devel] [PULL 08/15] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Stacey Son This change adds HOST_VARIANT_DIR so the various BSD OS dependent code can be separated into its own directories rather than using #ifdef's. This may also allow an BSD variant OS to host another BSD variant's executable as a target. Signed-off-by: Sean Bruno Message-id: 1402246651-71099-2-git-send-email-sbruno@freebsd.org Signed-off-by: Peter Maydell --- Makefile.target | 3 ++- configure | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.target b/Makefile.target index 8155496..4223283 100644 --- a/Makefile.target +++ b/Makefile.target @@ -102,7 +102,8 @@ endif #CONFIG_LINUX_USER ifdef CONFIG_BSD_USER -QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) +QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) \ + -I$(SRC_PATH)/bsd-user/$(HOST_VARIANT_DIR) obj-y += bsd-user/ obj-y += gdbstub.o user-exec.o diff --git a/configure b/configure index a994f41..baffaaa 100755 --- a/configure +++ b/configure @@ -541,6 +541,9 @@ fi # OS specific +# host *BSD for user mode +HOST_VARIANT_DIR="" + case $targetos in CYGWIN*) mingw32="yes" @@ -566,12 +569,14 @@ FreeBSD) # needed for kinfo_getvmmap(3) in libutil.h LIBS="-lutil $LIBS" netmap="" # enable netmap autodetect + HOST_VARIANT_DIR="freebsd" ;; DragonFly) bsd="yes" make="${MAKE-gmake}" audio_drv_list="oss" audio_possible_drivers="oss sdl esd pa" + HOST_VARIANT_DIR="dragonfly" ;; NetBSD) bsd="yes" @@ -579,12 +584,14 @@ NetBSD) audio_drv_list="oss" audio_possible_drivers="oss sdl esd" oss_lib="-lossaudio" + HOST_VARIANT_DIR="netbsd" ;; OpenBSD) bsd="yes" make="${MAKE-gmake}" audio_drv_list="sdl" audio_possible_drivers="sdl esd" + HOST_VARIANT_DIR="openbsd" ;; Darwin) bsd="yes" @@ -602,6 +609,7 @@ Darwin) # Disable attempts to use ObjectiveC features in os/object.h since they # won't work when we're compiling with gcc as a C compiler. QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS" + HOST_VARIANT_DIR="darwin" ;; SunOS) solaris="yes" @@ -4981,6 +4989,9 @@ if [ "$TARGET_ABI_DIR" = "" ]; then TARGET_ABI_DIR=$TARGET_ARCH fi echo "TARGET_ABI_DIR=$TARGET_ABI_DIR" >> $config_target_mak +if [ "$HOST_VARIANT_DIR" != "" ]; then + echo "HOST_VARIANT_DIR=$HOST_VARIANT_DIR" >> $config_target_mak +fi case "$target_name" in i386|x86_64) if test "$xen" = "yes" -a "$target_softmmu" = "yes" ; then