From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 02/10] configure: make $targetos lowercase, use windows instead of MINGW32
Date: Thu, 16 Dec 2021 09:51:31 +0100 [thread overview]
Message-ID: <20211216085139.99682-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20211216085139.99682-1-pbonzini@redhat.com>
targetos is already mostly the same as Meson host_machine.system(),
just in CamelCase. Adjust Windows, which is different, and switch to
lowercase to match Meson.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 58 ++++++++++++++++++++++++-------------------------------
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/configure b/configure
index ba7ab435a6..63438c1900 100755
--- a/configure
+++ b/configure
@@ -502,30 +502,30 @@ EOF
}
if check_define __linux__ ; then
- targetos="Linux"
+ targetos=linux
elif check_define _WIN32 ; then
- targetos='MINGW32'
+ targetos=windows
elif check_define __OpenBSD__ ; then
- targetos='OpenBSD'
+ targetos=openbsd
elif check_define __sun__ ; then
- targetos='SunOS'
+ targetos=sunos
elif check_define __HAIKU__ ; then
- targetos='Haiku'
+ targetos=haiku
elif check_define __FreeBSD__ ; then
- targetos='FreeBSD'
+ targetos=freebsd
elif check_define __FreeBSD_kernel__ && check_define __GLIBC__; then
- targetos='GNU/kFreeBSD'
+ targetos=gnu/kfreebsd
elif check_define __DragonFly__ ; then
- targetos='DragonFly'
+ targetos=dragonfly
elif check_define __NetBSD__; then
- targetos='NetBSD'
+ targetos=netbsd
elif check_define __APPLE__; then
- targetos='Darwin'
+ targetos=darwin
else
# This is a fatal error, but don't report it yet, because we
# might be going to just print the --help text, or it might
# be the result of a missing compiler.
- targetos='bogus'
+ targetos=bogus
fi
# Some host OSes need non-standard checks for which CPU to use.
@@ -533,7 +533,7 @@ fi
# cross-compiling to one of these OSes then you'll need to specify
# the correct CPU with the --cpu option.
case $targetos in
-SunOS)
+sunos)
# $(uname -m) returns i86pc even on an x86_64 box, so default based on isainfo
if test -z "$cpu" && test "$(isainfo -k)" = "amd64"; then
cpu="x86_64"
@@ -624,40 +624,40 @@ fi
# OS specific
case $targetos in
-MINGW32*)
+windows)
mingw32="yes"
plugins="no"
pie="no"
;;
-GNU/kFreeBSD)
+gnu/kfreebsd)
bsd="yes"
;;
-FreeBSD)
+freebsd)
bsd="yes"
bsd_user="yes"
make="${MAKE-gmake}"
# needed for kinfo_getvmmap(3) in libutil.h
;;
-DragonFly)
+dragonfly)
bsd="yes"
make="${MAKE-gmake}"
;;
-NetBSD)
+netbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-OpenBSD)
+openbsd)
bsd="yes"
make="${MAKE-gmake}"
;;
-Darwin)
+darwin)
bsd="yes"
darwin="yes"
# 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"
;;
-SunOS)
+sunos)
solaris="yes"
make="${MAKE-gmake}"
smbd="${SMBD-/usr/sfw/sbin/smbd}"
@@ -666,11 +666,11 @@ SunOS)
# needed for TIOCWIN* defines in termios.h
QEMU_CFLAGS="-D__EXTENSIONS__ $QEMU_CFLAGS"
;;
-Haiku)
+haiku)
pie="no"
QEMU_CFLAGS="-DB_USE_POSITIVE_POSIX_ERRORS -D_BSD_SOURCE -fPIC $QEMU_CFLAGS"
;;
-Linux)
+linux)
linux="yes"
linux_user="yes"
vhost_user=${default_feature:-yes}
@@ -3355,8 +3355,8 @@ QEMU_GA_MSI_MINGW_DLL_PATH="$($pkg_config --variable=prefix glib-2.0)/bin"
# Mac OS X ships with a broken assembler
roms=
if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \
- test "$targetos" != "Darwin" && test "$targetos" != "SunOS" && \
- test "$targetos" != "Haiku" && test "$softmmu" = yes ; then
+ test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
+ test "$targetos" != "haiku" && test "$softmmu" = yes ; then
# Different host OS linkers have different ideas about the name of the ELF
# emulation. Linux and OpenBSD/amd64 use 'elf_i386'; FreeBSD uses the _fbsd
# variant; OpenBSD/i386 uses the _obsd variant; and Windows uses i386pe.
@@ -3914,15 +3914,7 @@ if test "$skip_meson" = no; then
if test "$cross_compile" = "yes"; then
cross_arg="--cross-file config-meson.cross"
echo "[host_machine]" >> $cross
- if test "$mingw32" = "yes" ; then
- echo "system = 'windows'" >> $cross
- fi
- if test "$linux" = "yes" ; then
- echo "system = 'linux'" >> $cross
- fi
- if test "$darwin" = "yes" ; then
- echo "system = 'darwin'" >> $cross
- fi
+ echo "system = '$targetos'" >> $cross
case "$ARCH" in
i386)
echo "cpu_family = 'x86'" >> $cross
--
2.33.1
next prev parent reply other threads:[~2021-12-16 8:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 8:51 [PATCH 00/10] configure cleanups, mostly wrt $cpu and $targetos Paolo Bonzini
2021-12-16 8:51 ` [PATCH 01/10] configure: simplify creation of plugin symbol list Paolo Bonzini
2021-12-17 20:42 ` Richard Henderson
2021-12-16 8:51 ` Paolo Bonzini [this message]
2021-12-17 20:44 ` [PATCH 02/10] configure: make $targetos lowercase, use windows instead of MINGW32 Richard Henderson
2021-12-16 8:51 ` [PATCH 03/10] configure: move target detection before CPU detection Paolo Bonzini
2021-12-16 8:51 ` [PATCH 04/10] configure: do not set bsd_user/linux_user early Paolo Bonzini
2021-12-17 20:49 ` Richard Henderson
2021-12-18 10:16 ` Paolo Bonzini
2021-12-16 8:51 ` [PATCH 05/10] configure: unify two case statements on $cpu Paolo Bonzini
2021-12-17 21:37 ` Richard Henderson
2021-12-16 8:51 ` [PATCH 06/10] configure: unify ppc64 and ppc64le Paolo Bonzini
2021-12-16 9:06 ` Philippe Mathieu-Daudé
2021-12-17 21:43 ` Richard Henderson
2021-12-16 8:51 ` [PATCH 07/10] configure: unify x86_64 and x32 Paolo Bonzini
2021-12-16 9:10 ` Philippe Mathieu-Daudé
2021-12-16 15:30 ` Paolo Bonzini
2021-12-17 21:48 ` Richard Henderson
2021-12-20 9:52 ` Philippe Mathieu-Daudé
2021-12-17 21:46 ` Richard Henderson
2021-12-16 8:51 ` [PATCH 08/10] meson: rename "arch" variable Paolo Bonzini
2021-12-16 9:10 ` Philippe Mathieu-Daudé
2021-12-17 21:49 ` Richard Henderson
2021-12-16 8:51 ` [PATCH 09/10] configure, meson: move ARCH to meson.build Paolo Bonzini
2021-12-17 22:02 ` Richard Henderson
2021-12-16 8:51 ` [PATCH 10/10] configure: remove unnecessary symlinks Paolo Bonzini
2021-12-17 22:03 ` Richard Henderson
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=20211216085139.99682-3-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--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).