From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsuWp-0004ig-00 for qemu-devel@nongnu.org; Fri, 06 Jun 2014 09:50:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsuWf-00024t-FC for qemu-devel@nongnu.org; Fri, 06 Jun 2014 09:49:54 -0400 Received: from ignoranthack.me ([199.102.79.106]:50732 helo=mail.ignoranthack.me) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsuWf-00024h-AB for qemu-devel@nongnu.org; Fri, 06 Jun 2014 09:49:45 -0400 From: Sean Bruno Date: Fri, 6 Jun 2014 06:49:31 -0700 Message-Id: <1402062579-28716-2-git-send-email-sbruno@freebsd.org> In-Reply-To: <1402062579-28716-1-git-send-email-sbruno@freebsd.org> References: <1402062579-28716-1-git-send-email-sbruno@freebsd.org> Subject: [Qemu-devel] [PATCH 1/9 v3] FreeBSD-user: add HOST_VARIANT_DIR for various *BSD dependent code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Sean Bruno , Stacey Son From: Stacey Son 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. Signed-off-by: Stacey Son Signed-off-by: Sean Bruno --- Makefile.target | 3 ++- configure | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.target b/Makefile.target index 9986047..60c1ca6 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 0e516f9..3db9726 100755 --- a/configure +++ b/configure @@ -537,6 +537,9 @@ fi # OS specific +# host *BSD for user mode +HOST_VARIANT_DIR="" + case $targetos in CYGWIN*) mingw32="yes" @@ -562,12 +565,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" @@ -575,12 +580,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" @@ -598,6 +605,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" @@ -4982,6 +4990,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.9.3