[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/23] bsd-user: additional seperation of OS and
From: |
Stacey Son |
Subject: |
Re: [Qemu-devel] [PATCH 03/23] bsd-user: additional seperation of OS and architecture dependent code |
Date: |
Mon, 24 Jun 2013 15:15:28 -0500 |
On Jun 24, 2013, at 12:24 PM, Peter Maydell wrote:
> On 24 June 2013 03:03, Stacey Son <address@hidden> wrote:
>> diff --git a/configure b/configure
>> index ad32f87..749eba8 100755
>> --- a/configure
>> +++ b/configure
>> @@ -432,6 +432,7 @@ if test -z "$ARCH"; then
>> fi
>>
>> # OS specific
>> +TARGET_OS=""
>>
>> case $targetos in
>> CYGWIN*)
>> @@ -457,6 +458,7 @@ FreeBSD)
>> audio_possible_drivers="oss sdl esd pa"
>> # needed for kinfo_getvmmap(3) in libutil.h
>> LIBS="-lutil $LIBS"
>> + TARGET_OS="freebsd"
>> ;;
>> DragonFly)
>> bsd="yes"
>> @@ -470,12 +472,14 @@ NetBSD)
>> audio_drv_list="oss"
>> audio_possible_drivers="oss sdl esd"
>> oss_lib="-lossaudio"
>> + TARGET_OS="netbsd"
>> ;;
>> OpenBSD)
>> bsd="yes"
>> make="${MAKE-gmake}"
>> audio_drv_list="sdl"
>> audio_possible_drivers="sdl esd"
>> + TARGET_OS="openbsd"
>> ;;
>> Darwin)
>> bsd="yes"
>> @@ -4267,6 +4271,9 @@ upper() {
>>
>> target_arch_name="`upper $TARGET_ARCH`"
>> echo "TARGET_$target_arch_name=y" >> $config_target_mak
>> +if [ "$TARGET_OS" != "" ]; then
>> + echo "TARGET_OS=$TARGET_OS" >> $config_target_mak
>> +fi
>> echo "TARGET_NAME=$target_name" >> $config_target_mak
>> echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
>> if [ "$TARGET_ABI_DIR" = "" ]; then
>
> This looks kind of fishy. What do you need this for that
> you can't do just by checking for relevant preprocessor defines
> like __OpenBSD__ directly in the bsd-user code?
Note that the OS dependent directories are "freebsd", "netbsd", and "openbsd".
This is used in the Makefiles to use the correct OS dependent (which eliminates
much of the "#if defined(__OpenBSD__)" in the code files themselves).
Regards,
-stacey.
- Re: [Qemu-devel] [PATCH 02/23] bsd-user: add initial support for mips/mips64, (continued)
- [Qemu-devel] [PATCH 01/23] bsd-user: initial code clean up, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 11/23] bsd-user: add shims for file related system calls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 10/23] bsd-user: add shims for memory management related syscalls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 09/23] bsd-user: refresh FreeBSD's system call numbers, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 12/23] bsd-user: add shims for time related system calls., Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 03/23] bsd-user: additional seperation of OS and architecture dependent code, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 04/23] bsd-user: add bsd signal emulation, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 22/23] bsd-user: add more strace formating, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 20/23] bsd-user: add shims for extended attributes system calls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 18/23] bsd-user: add shim for the ioctl system call, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 16/23] bsd-user: add shims for stat and file handle related syscalls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 15/23] bsd-user: add shims for socket related system calls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 14/23] bsd-user: add shims for process related system calls, Stacey Son, 2013/06/24
- [Qemu-devel] [PATCH 21/23] bsd-user: add miscellaneous system call shims, Stacey Son, 2013/06/24