From nobody Thu May 2 20:41:39 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1490645577930352.4481752832643; Mon, 27 Mar 2017 13:12:57 -0700 (PDT) Received: from localhost ([::1]:48768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csb0a-00055n-KU for importer@patchew.org; Mon, 27 Mar 2017 16:12:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1csazb-0004SD-Ih for qemu-devel@nongnu.org; Mon, 27 Mar 2017 16:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1csazY-0002zt-Bu for qemu-devel@nongnu.org; Mon, 27 Mar 2017 16:11:55 -0400 Received: from mail.weilnetz.de ([37.120.169.71]:55032 helo=v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1csazY-0002zN-1R for qemu-devel@nongnu.org; Mon, 27 Mar 2017 16:11:52 -0400 Received: from localhost (localhost [127.0.0.1]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id A318ADA199F; Mon, 27 Mar 2017 22:11:49 +0200 (CEST) Received: from v2201612906741603.powersrv.de ([127.0.0.1]) by localhost (v2201612906741603.powersrv.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NT5R8XAJijz0; Mon, 27 Mar 2017 22:11:48 +0200 (CEST) Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id 0036EDA18EC; Mon, 27 Mar 2017 22:11:47 +0200 (CEST) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 8C330460146; Mon, 27 Mar 2017 22:11:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at v2201612906741603.powersrv.de From: Stefan Weil To: Peter Maydell , Paolo Bonzini Date: Mon, 27 Mar 2017 22:11:46 +0200 Message-Id: <20170327201146.1820-1-sw@weilnetz.de> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.120.169.71 Subject: [Qemu-devel] [PATCH for-2.9] Fix check for target OS support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Weil , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This check had several problems which are fixed here: * Calling "configure --help" was no longer possible on Cygwin. Fix this by introducing a third state for supported_os and by moving the error handling code. Move the error handling code for supported_cpu, too. * Fix the error text. Use target cpu and target os because the build cpu and build host don't matter here. * Support cross compilation with the most common cross prefixes for Mingw-w64. Other cross builds are still broken! Signed-off-by: Stefan Weil --- This fixes a regression: building QEMU for Windows with a cross build under Cygwin is currently broken. Can the patch be applied directly, or who should send a pull request? Stefan configure | 68 +++++++++++++++++++++++++++++++++++------------------------= ---- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/configure b/configure index d1ce33bc79..902bd20070 100755 --- a/configure +++ b/configure @@ -322,7 +322,7 @@ jemalloc=3D"no" replication=3D"yes" =20 supported_cpu=3D"no" -supported_os=3D"no" +supported_os=3D"deprecated" =20 # parse CC options first for opt do @@ -440,7 +440,13 @@ int main(void) { return 0; } EOF } =20 -if check_define __linux__ ; then +if test "$cross_prefix" =3D "i686_64-w64-mingw32-" ; then + targetos=3D'MINGW32' +elif test "$cross_prefix" =3D "x86_64-w64-mingw32-" ; then + targetos=3D'MINGW32' +elif test -n "$cross_prefix" ; then + targetos=3D"$cross_prefix" +elif check_define __linux__ ; then targetos=3D"Linux" elif check_define _WIN32 ; then targetos=3D'MINGW32' @@ -694,7 +700,7 @@ Linux) supported_os=3D"yes" ;; *) - error_exit "Unsupported host OS $targetos" + supported_os=3D"no" ;; esac =20 @@ -1428,6 +1434,34 @@ EOF exit 0 fi =20 +if test "$supported_cpu" =3D "no"; then + echo "WARNING: SUPPORT FOR THIS TARGET CPU WILL GO AWAY IN FUTURE RELE= ASES!" + echo + echo "CPU target architecture $cpu support is not currently maintained= ." + echo "The QEMU project intends to remove support for this target CPU i= n" + echo "a future release if nobody volunteers to maintain it and to" + echo "provide a build host for our continuous integration setup." + echo "configure has succeeded and you can continue to build, but" + echo "if you care about QEMU on this platform you should contact" + echo "us upstream at qemu-devel@nongnu.org." + echo +fi + +if test "$supported_os" =3D "no"; then + error_exit "Unsupported target OS $targetos" +elif test "$supported_os" =3D "deprecated"; then + echo "WARNING: SUPPORT FOR THIS TARGET OS WILL GO AWAY IN FUTURE RELEA= SES!" + echo + echo "Target OS $targetos support is not currently maintained." + echo "The QEMU project intends to remove support for this target OS in" + echo "a future release if nobody volunteers to maintain it and to" + echo "provide a build host for our continuous integration setup." + echo "configure has succeeded and you can continue to build, but" + echo "if you care about QEMU on this platform you should contact" + echo "us upstream at qemu-devel@nongnu.org." + echo +fi + # Now we have handled --enable-tcg-interpreter and know we're not just # printing the help message, bail out if the host CPU isn't supported. if test "$ARCH" =3D "unknown"; then @@ -5127,32 +5161,6 @@ if test "$sdl_too_old" =3D "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" fi =20 -if test "$supported_cpu" =3D "no"; then - echo - echo "WARNING: SUPPORT FOR THIS HOST CPU WILL GO AWAY IN FUTURE RELEAS= ES!" - echo - echo "CPU host architecture $cpu support is not currently maintained." - echo "The QEMU project intends to remove support for this host CPU in" - echo "a future release if nobody volunteers to maintain it and to" - echo "provide a build host for our continuous integration setup." - echo "configure has succeeded and you can continue to build, but" - echo "if you care about QEMU on this platform you should contact" - echo "us upstream at qemu-devel@nongnu.org." -fi - -if test "$supported_os" =3D "no"; then - echo - echo "WARNING: SUPPORT FOR THIS HOST OS WILL GO AWAY IN FUTURE RELEASE= S!" - echo - echo "Host OS $targetos support is not currently maintained." - echo "The QEMU project intends to remove support for this host OS in" - echo "a future release if nobody volunteers to maintain it and to" - echo "provide a build host for our continuous integration setup." - echo "configure has succeeded and you can continue to build, but" - echo "if you care about QEMU on this platform you should contact" - echo "us upstream at qemu-devel@nongnu.org." -fi - config_host_mak=3D"config-host.mak" =20 echo "# Automatically generated by configure - do not modify" >config-all-= disas.mak @@ -5212,7 +5220,7 @@ if test "$mingw32" =3D "yes" ; then echo "CONFIG_QGA_NTDDDISK=3Dy" >> $config_host_mak fi if test "$guest_agent_msi" =3D "yes"; then - echo "QEMU_GA_MSI_ENABLED=3Dyes" >> $config_host_mak =20 + echo "QEMU_GA_MSI_ENABLED=3Dyes" >> $config_host_mak echo "QEMU_GA_MSI_MINGW_DLL_PATH=3D${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $= config_host_mak echo "QEMU_GA_MSI_WITH_VSS=3D${QEMU_GA_MSI_WITH_VSS}" >> $config_host_= mak echo "QEMU_GA_MSI_ARCH=3D${QEMU_GA_MSI_ARCH}" >> $config_host_mak --=20 2.11.0