qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stacey Son <sson@FreeBSD.org>
To: qemu-devel@nongnu.org
Cc: Stacey Son <sson@FreeBSD.org>
Subject: [Qemu-devel] [PATCH v3 02/19] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code
Date: Tue, 17 Dec 2013 05:52:21 -0600	[thread overview]
Message-ID: <1387281158-65744-3-git-send-email-sson@FreeBSD.org> (raw)
In-Reply-To: <1387281158-65744-1-git-send-email-sson@FreeBSD.org>
In-Reply-To: <1383928417-38009-1-git-send-email-sson@FreeBSD.org>

This change adds HOST_VARIANT_DIR so the various BSD OS dependent
code can be seperated into its own directories rather than
using #ifdef's.   This may also allow an BSD variant OS to host
another BSD variant's executible as a target.
---
 Makefile.target |    3 ++-
 configure       |   11 +++++++++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index af6ac7e..1306b24 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -99,7 +99,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 edfea95..4e834cf 100755
--- a/configure
+++ b/configure
@@ -465,6 +465,9 @@ fi
 
 # OS specific
 
+# host *BSD for user mode
+HOST_VARIANT_DIR=""
+
 case $targetos in
 CYGWIN*)
   mingw32="yes"
@@ -490,12 +493,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"
@@ -503,12 +508,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"
@@ -527,6 +534,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"
@@ -4538,6 +4546,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
-- 
1.7.8

  parent reply	other threads:[~2013-12-17 20:55 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 14:36 [Qemu-devel] [PATCH 00/18] bsd-user: Add system call and mips/arm support Stacey Son
2013-10-16 14:36 ` [Qemu-devel] [PATCH 01/18] bsd-user: refresh freebsd system call numbers Stacey Son
2013-10-24  1:22   ` Ed Maste
2013-10-16 14:36 ` [Qemu-devel] [PATCH 02/18] bsd-user: add HOST_ABI_DIR for the various *BSD dependent code Stacey Son
2013-10-16 14:36 ` [Qemu-devel] [PATCH 03/18] bsd-user: move OS/arch dependent code for strace into separate directories Stacey Son
2013-10-16 14:36 ` [Qemu-devel] [PATCH 04/18] bsd-user: move target arch and host OS dependent code out of main.c Stacey Son
2013-10-16 15:38   ` [Qemu-devel] [PATCH 04/18] bsd-user: move target arch and host OSdependent code out of main.cc Alex Bennée
2013-10-16 15:46     ` Stacey Son
2013-10-16 16:32       ` Peter Maydell
2013-10-17 19:07         ` Stacey Son
2013-10-16 14:36 ` [Qemu-devel] [PATCH 05/18] bsd-user: move target arch and host OS dependent code out of syscall.c Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 06/18] bsd-user: add support for freebsd time related system calls Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 07/18] bsd-user: add support for freebsd signal " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 08/18] bsd-user: move target arch and host OS dependent code out of elfload.c Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 09/18] bsd-user: add support for freebsd process related system calls Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 10/18] bsd-user: add support for file system " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 11/18] bsd-user: add support for stat, directory, and file control " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 12/18] bsd-user: add support for memory management " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 13/18] bsd-user: add support for socket " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 14/18] bsd-user: add support for thread " Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 15/18] bsd-user: add support for the ioctl system call Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 16/18] bsd-user: add support for extended attribute and ACL related syscalls Stacey Son
2014-01-27 20:11   ` Peter Maydell
2013-10-16 14:37 ` [Qemu-devel] [PATCH 17/18] bsd-user: add support for miscellaneous system calls Stacey Son
2013-10-16 14:37 ` [Qemu-devel] [PATCH 18/18] bsd-user: add arm, mips and mips64 options to configure target-list Stacey Son
2013-10-16 15:22   ` [Qemu-devel] [PATCH 18/18] bsd-user: add arm, mips and mips64 options to configure target-listt Alex Bennée
2013-10-16 16:12     ` Stacey Son
2013-10-16 16:31     ` Peter Maydell
2013-10-16 16:26   ` [Qemu-devel] [PATCH 18/18] bsd-user: add arm, mips and mips64 options to configure target-list Peter Maydell
2013-10-16 15:27 ` [Qemu-devel] [PATCH 00/18] bsd-user: Add system call and mips/armsupport Alex Bennée
2013-10-16 15:40   ` Stacey Son
2013-10-16 16:29 ` [Qemu-devel] [PATCH 00/18] bsd-user: Add system call and mips/arm support Peter Maydell
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 00/19] " Stacey Son
2013-11-26 21:01   ` Ed Maste
2013-11-27 11:29     ` Paolo Bonzini
2013-12-12 19:57       ` Ed Maste
2013-12-12 20:15         ` Stacey Son
2013-12-13 12:44         ` Paolo Bonzini
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 " Stacey Son
2014-01-27 19:15     ` Peter Maydell
2014-01-27 19:27       ` Stacey Son
2014-01-27 20:18         ` Peter Maydell
2014-05-08 14:59           ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 01/19] bsd-user: refresh freebsd system call numbers Stacey Son
2014-01-27 19:30     ` Peter Maydell
2014-02-01 12:11       ` Ed Maste
2013-12-17 11:52   ` Stacey Son [this message]
2014-01-27 19:31     ` [Qemu-devel] [PATCH v3 02/19] bsd-user: add HOST_VARIANT_DIR for various *BSD dependent code Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 03/19] bsd-user: move strace OS/arch dependent code to host/arch dirs Stacey Son
2014-01-27 19:46     ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 04/19] bsd-user: move arch/OS dependent code out of main.c Stacey Son
2014-01-27 19:50     ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 05/19] bsd-user: move arch/OS dependent code out of syscall.c Stacey Son
2014-01-27 19:52     ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 06/19] bsd-user: add support for freebsd time related system calls Stacey Son
2014-01-27 19:58     ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 07/19] bsd-user: add support for freebsd signal " Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 08/19] bsd-user: move arch/OS dependent code out of elfload.c Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 09/19] bsd-user: add support for freebsd process related system calls Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 10/19] bsd-user: add support for file system " Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 11/19] bsd-user: add support for stat, dir, and fcntl related syscalls Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 12/19] bsd-user: add support for memory management " Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 13/19] bsd-user: add support for socket related system calls Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 14/19] bsd-user: add support for thread " Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 15/19] bsd-user: add support for the ioctl system call Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 16/19] bsd-user: add support for extattr and ACL related syscalls Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 17/19] bsd-user: add support for miscellaneous system calls Stacey Son
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 18/19] bsd-user: add arm, mips and mips64 options to configure target-list Stacey Son
2014-01-27 20:03     ` Peter Maydell
2013-12-17 11:52   ` [Qemu-devel] [PATCH v3 19/19] bsd-user: fix linking conflicts with FreeBSD libcrypto Stacey Son
2014-01-27 20:07     ` Peter Maydell
2014-01-27 20:15       ` Stacey Son
2014-01-28 10:17       ` Paolo Bonzini
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 01/19] bsd-user: refresh freebsd system call numbers Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 02/19] bsd-user: add HOST_ABI_DIR for the various *BSD dependent code Stacey Son
2013-11-27 11:27   ` Paolo Bonzini
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 03/19] bsd-user: move OS/arch dependent code for strace into separate directories Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 04/19] bsd-user: move target arch and host OS dependent code out of main.c Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 05/19] bsd-user: move target arch and host OS dependent code out of syscall.c Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 06/19] bsd-user: add support for freebsd time related system calls Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 07/19] bsd-user: add support for freebsd signal " Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 08/19] bsd-user: move target arch and host OS dependent code out of elfload.c Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 09/19] bsd-user: add support for freebsd process related system calls Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 10/19] bsd-user: add support for file system " Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 11/19] bsd-user: add support for stat, directory, and file control " Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 12/19] bsd-user: add support for memory management " Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 13/19] bsd-user: add support for socket " Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 14/19] bsd-user: add support for thread " Stacey Son
2013-11-27 11:28   ` Paolo Bonzini
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 15/19] bsd-user: add support for the ioctl system call Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 16/19] bsd-user: add support for extended attribute and ACL related syscalls Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 17/19] bsd-user: add support for miscellaneous system calls Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 18/19] bsd-user: add arm, mips and mips64 options to configure target-list Stacey Son
2013-11-08 16:33 ` [Qemu-devel] [PATCH v2 19/19] bsd-user: fix linking conflicts with FreeBSD libcrypto Stacey Son
2013-11-27 11:23   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387281158-65744-3-git-send-email-sson@FreeBSD.org \
    --to=sson@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).