From nobody Fri May 17 22:20:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1675899126; cv=none; d=zohomail.com; s=zohoarc; b=Vr2G2OEpah2Uwe1biM9IEm438hWRITqsZLYBp98rcyVfrH/d8OYz+GSg0b/zZPhlYpUihoY3FQ7DtPX/F5nQWkCJtozIfWulO8kq+GQ2BHfgRENY+JproWXKvbKqrD+zkSLE4XW/zTu8TrRQfmlquM4oLD/j/3NcQiWKX3tM/RA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675899126; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OnazYuHyxNSCi+Fg8vSUtnrPTevUheyj/KShdTnQ70o=; b=jhOh6fnGI4num5BQBOWSPwaN3T8+2GGVKU+nMYiv0Ww6DAQwEwps1kWxUarB6H2Lg2YICQ3QS181ao00lyI557Gdo+ZATOpDt7aQ+BgY4ov9+ID/Na5yMyEWrHHLlopWQEVBmNn3yoSVAtneclCH9th7rUJ80B0P1NcrssY6jq8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675899126138377.6830151751724; Wed, 8 Feb 2023 15:32:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPtuU-0003Be-Gi; Wed, 08 Feb 2023 18:31:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPtuO-00038i-Kc for qemu-devel@nongnu.org; Wed, 08 Feb 2023 18:31:24 -0500 Received: from mail-qv1-xf2f.google.com ([2607:f8b0:4864:20::f2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPtuM-0005rH-Rx for qemu-devel@nongnu.org; Wed, 08 Feb 2023 18:31:24 -0500 Received: by mail-qv1-xf2f.google.com with SMTP id i1so278856qvo.9 for ; Wed, 08 Feb 2023 15:31:22 -0800 (PST) Received: from debian.hsd1.ma.comcast.net ([2601:182:cc00:77b0::2bf5]) by smtp.gmail.com with ESMTPSA id s63-20020a37a942000000b0071c9eea2056sm168048qke.14.2023.02.08.15.31.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 15:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OnazYuHyxNSCi+Fg8vSUtnrPTevUheyj/KShdTnQ70o=; b=mHuinZ+Pr+r6EOgQDbjF8TD67lBunn2GBRphwRQIOym43bAB38hKJH1TFMVLzDN+Up DljKawni9RFSoKLW+NpgYApHWiPp5SqbTc+KMK2oloxrWbGcwILZNUlEav3wHgwJyk0t cMLojlfN9rUYDRo39ey0psbs1eYG/iysirNYJ//ulkEg1SpKGUa0y2OxEhE1z/t8GiCC 4ZCRE4Wa1CrwXS5ZH0RAutFwXUNuChogC7bySP7JeVmR9w4C51Q3SOy+JMUUpNilyunw PXCOtdLzdOzbLl7mD5bZzoEwTPBqwrc4KRrbEzuWUR5h5qhKJZ4vy7FM8w+/qyc5oWnY LbeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OnazYuHyxNSCi+Fg8vSUtnrPTevUheyj/KShdTnQ70o=; b=VlGj54vk/GD6/2trVvmXcQpbQ9689RoPA0E6n/+bnbuXnXAUu9ZIAAk6HS0WpJiXWi YOcIP1XBkLzpkUQKnkuqsypYK8Mc3G3sDYMYuuLsFo7blg4/qKOujAmAPJxV+KOCneoo o9Z4M3h2HKfUoovHaBgdZDoK03l0y1fIlSbn3fW7kEnZlrQqjJ/wHkn9Fq+23w79DhOD aHa878nzLW6FBxhQHgEC+lKIobfQp6yZTuZNAODe2MFHWDNI7gz7+CQ+iol4lECDMW+6 zmnJwiIylHQZVwzY1Zo8QjLUZEjemRDIC4WZc/3XdyovYq7er6pINglGTYrMfR4fB4Km GFpg== X-Gm-Message-State: AO0yUKXjI+9uodKaEndx1Bk2SPyezgwUMmRpn6cCUZ3dkHTk6H9dj2a9 9SLJPGr0k8kOl32UpHxY5s7bYmlLYoaLjw== X-Google-Smtp-Source: AK7set/5Llpnr8HWLOGRexJaCTj0JxO3y/ZkEUG4GC1ioJI5ZezGaI1S2WbAMWoR1M7lV21nMf1oPg== X-Received: by 2002:a05:6214:5299:b0:536:ba5e:6aa8 with SMTP id kj25-20020a056214529900b00536ba5e6aa8mr14039909qvb.49.1675899081369; Wed, 08 Feb 2023 15:31:21 -0800 (PST) From: Dinah Baum To: qemu-devel@nongnu.org Cc: Dinah Baum , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth Subject: [PATCH 1/2] configure: Add 'mkdir build' check Date: Wed, 8 Feb 2023 18:31:10 -0500 Message-Id: <20230208233111.398577-2-dinahbaum123@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208233111.398577-1-dinahbaum123@gmail.com> References: <20230208233111.398577-1-dinahbaum123@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::f2f; envelope-from=dinahbaum123@gmail.com; helo=mail-qv1-xf2f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1675899128233100004 Content-Type: text/plain; charset="utf-8" QEMU configure script goes into an infinite error printing loop when in read only directory due to 'build' dir never being created. Checking if 'mkdir dir' succeeds prevents this error. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 --- configure | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 64960c6000..3b384914ce 100755 --- a/configure +++ b/configure @@ -31,10 +31,11 @@ then fi fi =20 - mkdir build - touch $MARKER + if mkdir build + then + touch $MARKER =20 - cat > GNUmakefile <<'EOF' + cat > GNUmakefile <<'EOF' # This file is auto-generated by configure to support in-source tree # 'make' command invocation =20 @@ -56,8 +57,12 @@ force: ; GNUmakefile: ; =20 EOF - cd build - exec "$source_path/configure" "$@" + cd build + exec "$source_path/configure" "$@" + else + echo "ERROR: Unable to use ./build dir, try using a ../qemu/config= ure build" + exit 1 + fi fi =20 # Temporary directory used for files created while --=20 2.30.2 From nobody Fri May 17 22:20:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1675899152; cv=none; d=zohomail.com; s=zohoarc; b=YrM9pwbchQUQVa+U+oLoCFlpDE40sR6CVaqaa7D4jGRjY7tZTo2txNFZUNRuPZpDQ//MHK2b8W/IvGgJmGvao/LK8ElrKwrQ7VffakVabkURUdtqMxXucUC2FQHd5686BsXVeDUlBlKSm8e5KAkwhPF6hPCEH/5uj2PDZ3eozks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675899152; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TJLcdCW9Ct+Bvn6+4o87+8ZttLv2QC99zMir+rC/HCk=; b=mNyQPPiUkDKg5EXZylIJYoFId0k4xMXT5N7lN5U8/gPsgSa4dJAug6sxXCLJah+NFj01+VdmBYwaUhZKdTk5vZl7XQ6hImESIUMSLtRkUsP/nk+HaWK/j6e+S533ImfTJWhztXZULcfl4XkDiwIpS5RRngrgE4pEGaOpNMB8aZs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1675899152625672.2240271497584; Wed, 8 Feb 2023 15:32:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPtuX-0003Cv-40; Wed, 08 Feb 2023 18:31:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pPtuS-0003BG-P4 for qemu-devel@nongnu.org; Wed, 08 Feb 2023 18:31:28 -0500 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPtuP-0005ps-Rb for qemu-devel@nongnu.org; Wed, 08 Feb 2023 18:31:28 -0500 Received: by mail-qt1-x82e.google.com with SMTP id m12so210751qth.4 for ; Wed, 08 Feb 2023 15:31:25 -0800 (PST) Received: from debian.hsd1.ma.comcast.net ([2601:182:cc00:77b0::2bf5]) by smtp.gmail.com with ESMTPSA id s63-20020a37a942000000b0071c9eea2056sm168048qke.14.2023.02.08.15.31.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 15:31:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TJLcdCW9Ct+Bvn6+4o87+8ZttLv2QC99zMir+rC/HCk=; b=iUQJcH7z1OkVPU72zdW+i9EqLvrUByXv8cC04ktis7RcVjdxJXiVlxTTgzYMsdT0us v1jxSXGAiWXIeLFDBLuFn3sBYl2j5Bc+FCiLPrz1uErznncFHjiVNotqCepreZoB4J8l 74m0QI9c76PpkkTx+IL56R5mwJdhyQLVwyx7vYtNbvtxmBeQbgsOL2vZysctpjpeNuPq E4Kq13xQZDMLDl/tA6IwGsZOAlmJwPhNHmGy1uwR4mZG2GXP2iraOeT4WvsWZzf1Up4f SHAZDnXY2jH9VZcuaPzK5AHB2Y8X/zFYAGEKYocH5iHEwqg76aRHNYLxwalYyTJy1uxf bi/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TJLcdCW9Ct+Bvn6+4o87+8ZttLv2QC99zMir+rC/HCk=; b=hU65YPt2dBkN9aNUgqST6IIcweV0aaoG1y06X7/dNdHBYVRzI/iLGRYIc4gH27u870 kxZY7yDLxR6N9LxhuUtbvIitSLsq7gM93rnZ3xnQxjNEXN94UXIU7OF8tb3c2yTsAmLV agYFDxGFc7YzLA8tNFCkLZ7zjMA/gva2c+3pndBZHulkcXtcXELh+5hBokAn5UJRScKp DDvPf5RHjeUhW05eKoJLycZJWXbp69p1on2k+XOCZTlCw26FtrocFDXcjpBoFTu1CiND /9Lj77GCqOjWiausKK9u7ovqhy764alSQvsZZnCqOYSJAC6rTi/8W6AhsKUnMVRL8s/w 6hNQ== X-Gm-Message-State: AO0yUKUkYr09FIE7a32HoMhwrNyJK62/MRSB/pS+7lTrCMvuYzEw3v/y vrEjoRs4pDdVWOvfxbscqNfRDVhLpp8W1g== X-Google-Smtp-Source: AK7set/QE0bjUmcHpN7jQVOjsLyLexzExSrGwNxUi6xMKtT/jjrTQNpLnIOcVTvp/H58Lf9nqofNoQ== X-Received: by 2002:ac8:4e48:0:b0:3b9:a51f:8988 with SMTP id e8-20020ac84e48000000b003b9a51f8988mr16898862qtw.31.1675899084573; Wed, 08 Feb 2023 15:31:24 -0800 (PST) From: Dinah Baum To: qemu-devel@nongnu.org Cc: Dinah Baum , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth Subject: [PATCH 2/2] configure: './configure --help' should work Date: Wed, 8 Feb 2023 18:31:11 -0500 Message-Id: <20230208233111.398577-3-dinahbaum123@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230208233111.398577-1-dinahbaum123@gmail.com> References: <20230208233111.398577-1-dinahbaum123@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=dinahbaum123@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1675899154334100001 Content-Type: text/plain; charset="utf-8" Always initialize --help display option Resolves: https://gitlab.com/qemu-project/qemu/-/issues/321 --- configure | 676 +++++++++++++++++++++++++++--------------------------- 1 file changed, 338 insertions(+), 338 deletions(-) diff --git a/configure b/configure index 3b384914ce..1fb4d145f1 100755 --- a/configure +++ b/configure @@ -14,6 +14,344 @@ export CCACHE_RECACHE=3Dyes # make source path absolute source_path=3D$(cd "$(dirname -- "$0")"; pwd) =20 +werror=3D"" + +print_error() { + (echo + echo "ERROR: $1" + while test -n "$2"; do + echo " $2" + shift + done + echo) >&2 +} + +error_exit() { + print_error "$@" + exit 1 +} + +meson_option_build_array() { + printf '[' + (if test "$targetos" =3D windows; then + IFS=3D\; + else + IFS=3D: + fi + for e in $1; do + printf '"""' + # backslash escape any '\' and '"' characters + printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g' + printf '""",' + done) + printf ']\n' +} + +. "$source_path/scripts/meson-buildoptions.sh" + +quote_sh() { + printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&'," +} + +meson_options=3D +meson_option_add() { + meson_options=3D"$meson_options $(quote_sh "$1")" +} +meson_option_parse() { + meson_options=3D"$meson_options $(_meson_option_parse "$@")" + if test $? -eq 1; then + echo "ERROR: unknown option $1" + echo "Try '$0 --help' for more information" + exit 1 + fi +} + +for opt do + optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') + case "$opt" in + --help|-h) show_help=3Dyes + ;; + --version|-V) exec cat "$source_path/VERSION" + ;; + --prefix=3D*) prefix=3D"$optarg" + ;; + --cross-prefix=3D*) + ;; + --cc=3D*) + ;; + --host-cc=3D*) host_cc=3D"$optarg" + ;; + --cxx=3D*) + ;; + --objcc=3D*) objcc=3D"$optarg" + ;; + --make=3D*) make=3D"$optarg" + ;; + --install=3D*) + ;; + --python=3D*) python=3D"$optarg" ; explicit_python=3Dyes + ;; + --skip-meson) skip_meson=3Dyes + ;; + --meson=3D*) meson=3D"$optarg" + ;; + --ninja=3D*) ninja=3D"$optarg" + ;; + --smbd=3D*) smbd=3D"$optarg" + ;; + --extra-cflags=3D*) + ;; + --extra-cxxflags=3D*) + ;; + --extra-objcflags=3D*) + ;; + --extra-ldflags=3D*) + ;; + --cross-cc-*) + ;; + --cross-prefix-*) + ;; + --enable-debug-info) meson_option_add -Ddebug=3Dtrue + ;; + --disable-debug-info) meson_option_add -Ddebug=3Dfalse + ;; + --enable-modules) + modules=3D"yes" + ;; + --disable-modules) + modules=3D"no" + ;; + --cpu=3D*) + ;; + --target-list=3D*) target_list=3D"$optarg" + if test "$target_list_exclude"; then + error_exit "Can't mix --target-list with --target-l= ist-exclude" + fi + ;; + --target-list-exclude=3D*) target_list_exclude=3D"$optarg" + if test "$target_list"; then + error_exit "Can't mix --target-list-exclude with --= target-list" + fi + ;; + --with-default-devices) meson_option_add -Ddefault_devices=3Dtrue + ;; + --without-default-devices) meson_option_add -Ddefault_devices=3Dfalse + ;; + --with-devices-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --with-devic= es-FOO option" + ;; + --with-devices-*) device_arch=3D${opt#--with-devices-}; + device_arch=3D${device_arch%%=3D*} + cf=3D$source_path/configs/devices/$device_arch-softmmu= /$optarg.mak + if test -f "$cf"; then + device_archs=3D"$device_archs $device_arch" + eval "devices_${device_arch}=3D\$optarg" + else + error_exit "File $cf does not exist" + fi + ;; + --without-default-features) # processed above + ;; + --static) + static=3D"yes" + QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" + ;; + --bindir=3D*) bindir=3D"$optarg" + ;; + --with-suffix=3D*) qemu_suffix=3D"$optarg" + ;; + --host=3D*|--build=3D*|\ + --disable-dependency-tracking|\ + --sbindir=3D*|--sharedstatedir=3D*|\ + --oldincludedir=3D*|--datarootdir=3D*|--infodir=3D*|\ + --htmldir=3D*|--dvidir=3D*|--pdfdir=3D*|--psdir=3D*) + # These switches are silently ignored, for compatibility with + # autoconf-generated configure scripts. This allows QEMU's + # configure to be used by RPM and similar macros that set + # lots of directory switches by default. + ;; + --enable-debug-tcg) debug_tcg=3D"yes" + ;; + --disable-debug-tcg) debug_tcg=3D"no" + ;; + --enable-debug) + # Enable debugging options that aren't excessively noisy + debug_tcg=3D"yes" + meson_option_parse --enable-debug-mutex "" + meson_option_add -Doptimization=3D0 + fortify_source=3D"no" + ;; + --enable-sanitizers) sanitizers=3D"yes" + ;; + --disable-sanitizers) sanitizers=3D"no" + ;; + --enable-tsan) tsan=3D"yes" + ;; + --disable-tsan) tsan=3D"no" + ;; + --disable-tcg) tcg=3D"disabled" + plugins=3D"no" + ;; + --enable-tcg) tcg=3D"enabled" + ;; + --disable-system) softmmu=3D"no" + ;; + --enable-system) softmmu=3D"yes" + ;; + --disable-user) + linux_user=3D"no" ; + bsd_user=3D"no" ; + ;; + --enable-user) ;; + --disable-linux-user) linux_user=3D"no" + ;; + --enable-linux-user) linux_user=3D"yes" + ;; + --disable-bsd-user) bsd_user=3D"no" + ;; + --enable-bsd-user) bsd_user=3D"yes" + ;; + --enable-pie) pie=3D"yes" + ;; + --disable-pie) pie=3D"no" + ;; + --enable-werror) werror=3D"yes" + ;; + --disable-werror) werror=3D"no" + ;; + --enable-stack-protector) stack_protector=3D"yes" + ;; + --disable-stack-protector) stack_protector=3D"no" + ;; + --enable-safe-stack) safe_stack=3D"yes" + ;; + --disable-safe-stack) safe_stack=3D"no" + ;; + --enable-cfi) + cfi=3D"true"; + meson_option_add -Db_lto=3Dtrue + ;; + --disable-cfi) cfi=3D"false" + ;; + --disable-fdt) fdt=3D"disabled" + ;; + --enable-fdt) fdt=3D"enabled" + ;; + --enable-fdt=3Dgit) fdt=3D"internal" + ;; + --enable-fdt=3D*) fdt=3D"$optarg" + ;; + --with-coroutine=3D*) coroutine=3D"$optarg" + ;; + --with-git=3D*) git=3D"$optarg" + ;; + --with-git-submodules=3D*) + git_submodules_action=3D"$optarg" + ;; + --enable-plugins) if test "$mingw32" =3D "yes"; then + error_exit "TCG plugins not currently supported on= Windows platforms" + else + plugins=3D"yes" + fi + ;; + --disable-plugins) plugins=3D"no" + ;; + --enable-containers) use_containers=3D"yes" + ;; + --disable-containers) use_containers=3D"no" + ;; + --gdb=3D*) gdb_bin=3D"$optarg" + ;; + --enable-vfio-user-server) vfio_user_server=3D"enabled" + ;; + --disable-vfio-user-server) vfio_user_server=3D"disabled" + ;; + # everything else has the same name in configure and meson + --*) meson_option_parse "$opt" "$optarg" + ;; + esac +done + +# test for any invalid configuration combinations +if test "$plugins" =3D "yes" -a "$tcg" =3D "disabled"; then + error_exit "Can't enable plugins on non-TCG builds" +fi + +if test x"$show_help" =3D x"yes" ; then +cat << EOF + +Usage: configure [options] +Options: [defaults in brackets after descriptions] + +Standard options: + --help print this message + --prefix=3DPREFIX install in PREFIX [$prefix] + --target-list=3DLIST set target list (default: build all) +$(echo Available targets: $default_target_list | \ + fold -s -w 53 | sed -e 's/^/ /') + --target-list-exclude=3DLIST exclude a set of targets from the default t= arget-list + +Advanced options (experts only): + --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] + --cc=3DCC use C compiler CC [$cc] + --host-cc=3DCC use C compiler CC [$host_cc] for code run at + build time + --cxx=3DCXX use C++ compiler CXX [$cxx] + --objcc=3DOBJCC use Objective-C compiler OBJCC [$objcc] + --extra-cflags=3DCFLAGS append extra C compiler flags CFLAGS + --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags CXXFLAGS + --extra-objcflags=3DOBJCFLAGS append extra Objective C compiler flags OB= JCFLAGS + --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS + --cross-cc-ARCH=3DCC use compiler when building ARCH guest test ca= ses + --cross-cc-cflags-ARCH=3D use compiler flags when building ARCH guest t= ests + --cross-prefix-ARCH=3DPREFIX cross compiler prefix when building ARCH gu= est test cases + --make=3DMAKE use specified make [$make] + --python=3DPYTHON use specified python [$python] + --meson=3DMESON use specified meson [$meson] + --ninja=3DNINJA use specified ninja [$ninja] + --smbd=3DSMBD use specified smbd [$smbd] + --with-git=3DGIT use specified git [$git] + --with-git-submodules=3Dupdate update git submodules (default if .git = dir exists) + --with-git-submodules=3Dvalidate fail if git submodules are not up to da= te + --with-git-submodules=3Dignore do not update or check git submodules (= default if no .git dir) + --static enable static build [$static] + --bindir=3DPATH install binaries in PATH + --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] + --without-default-features default all --enable-* options to "disabled" + --without-default-devices do not include any device that is not needed = to + start the emulator (only use if you are includi= ng + desired devices in configs/devices/) + --with-devices-ARCH=3DNAME override default configs/devices + --enable-debug enable common debug build options + --enable-sanitizers enable default sanitizers + --enable-tsan enable thread sanitizer + --disable-werror disable compilation abort on warning + --disable-stack-protector disable compiler-provided stack protection + --cpu=3DCPU Build for host CPU [$cpu] + --with-coroutine=3DBACKEND coroutine backend. Supported options: + ucontext, sigaltstack, windows + --enable-plugins + enable plugins via shared library loading + --disable-containers don't use containers for cross-building + --gdb=3DGDB-path gdb to use for gdbstub tests [$gdb_bin] +EOF + meson_options_help +cat << EOF + system all system emulation targets + user supported user emulation targets + linux-user all linux usermode emulation targets + bsd-user all BSD usermode emulation targets + pie Position Independent Executables + modules modules support (non-Windows) + debug-tcg TCG debugging (default is disabled) + debug-info debugging information + safe-stack SafeStack Stack Smash Protection. Depends on + clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. + +NOTE: The object files are built at the place where configure is launched +EOF +exit 0 +fi + if test "$PWD" =3D "$source_path" then echo "Using './build' as the directory for build output" @@ -93,25 +431,6 @@ invoke=3D$(printf " '%s'" "$0" "$@") test -n "$GITLAB_CI" && echo "configuring with: $invoke" { echo "$invoke"; echo; echo "#"; } >> config.log =20 -quote_sh() { - printf "%s" "$1" | sed "s,','\\\\'',g; s,.*,'&'," -} - -print_error() { - (echo - echo "ERROR: $1" - while test -n "$2"; do - echo " $2" - shift - done - echo) >&2 -} - -error_exit() { - print_error "$@" - exit 1 -} - do_compiler() { # Run the compiler, capturing its output to the log. First argument # is compiler binary to execute. @@ -639,249 +958,6 @@ if test "$mingw32" =3D "yes" ; then qemu_suffix=3D"" fi =20 -werror=3D"" - -meson_option_build_array() { - printf '[' - (if test "$targetos" =3D windows; then - IFS=3D\; - else - IFS=3D: - fi - for e in $1; do - printf '"""' - # backslash escape any '\' and '"' characters - printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g' - printf '""",' - done) - printf ']\n' -} - -. "$source_path/scripts/meson-buildoptions.sh" - -meson_options=3D -meson_option_add() { - meson_options=3D"$meson_options $(quote_sh "$1")" -} -meson_option_parse() { - meson_options=3D"$meson_options $(_meson_option_parse "$@")" - if test $? -eq 1; then - echo "ERROR: unknown option $1" - echo "Try '$0 --help' for more information" - exit 1 - fi -} - -for opt do - optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') - case "$opt" in - --help|-h) show_help=3Dyes - ;; - --version|-V) exec cat "$source_path/VERSION" - ;; - --prefix=3D*) prefix=3D"$optarg" - ;; - --cross-prefix=3D*) - ;; - --cc=3D*) - ;; - --host-cc=3D*) host_cc=3D"$optarg" - ;; - --cxx=3D*) - ;; - --objcc=3D*) objcc=3D"$optarg" - ;; - --make=3D*) make=3D"$optarg" - ;; - --install=3D*) - ;; - --python=3D*) python=3D"$optarg" ; explicit_python=3Dyes - ;; - --skip-meson) skip_meson=3Dyes - ;; - --meson=3D*) meson=3D"$optarg" - ;; - --ninja=3D*) ninja=3D"$optarg" - ;; - --smbd=3D*) smbd=3D"$optarg" - ;; - --extra-cflags=3D*) - ;; - --extra-cxxflags=3D*) - ;; - --extra-objcflags=3D*) - ;; - --extra-ldflags=3D*) - ;; - --cross-cc-*) - ;; - --cross-prefix-*) - ;; - --enable-debug-info) meson_option_add -Ddebug=3Dtrue - ;; - --disable-debug-info) meson_option_add -Ddebug=3Dfalse - ;; - --enable-modules) - modules=3D"yes" - ;; - --disable-modules) - modules=3D"no" - ;; - --cpu=3D*) - ;; - --target-list=3D*) target_list=3D"$optarg" - if test "$target_list_exclude"; then - error_exit "Can't mix --target-list with --target-l= ist-exclude" - fi - ;; - --target-list-exclude=3D*) target_list_exclude=3D"$optarg" - if test "$target_list"; then - error_exit "Can't mix --target-list-exclude with --= target-list" - fi - ;; - --with-default-devices) meson_option_add -Ddefault_devices=3Dtrue - ;; - --without-default-devices) meson_option_add -Ddefault_devices=3Dfalse - ;; - --with-devices-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --with-devic= es-FOO option" - ;; - --with-devices-*) device_arch=3D${opt#--with-devices-}; - device_arch=3D${device_arch%%=3D*} - cf=3D$source_path/configs/devices/$device_arch-softmmu= /$optarg.mak - if test -f "$cf"; then - device_archs=3D"$device_archs $device_arch" - eval "devices_${device_arch}=3D\$optarg" - else - error_exit "File $cf does not exist" - fi - ;; - --without-default-features) # processed above - ;; - --static) - static=3D"yes" - QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" - ;; - --bindir=3D*) bindir=3D"$optarg" - ;; - --with-suffix=3D*) qemu_suffix=3D"$optarg" - ;; - --host=3D*|--build=3D*|\ - --disable-dependency-tracking|\ - --sbindir=3D*|--sharedstatedir=3D*|\ - --oldincludedir=3D*|--datarootdir=3D*|--infodir=3D*|\ - --htmldir=3D*|--dvidir=3D*|--pdfdir=3D*|--psdir=3D*) - # These switches are silently ignored, for compatibility with - # autoconf-generated configure scripts. This allows QEMU's - # configure to be used by RPM and similar macros that set - # lots of directory switches by default. - ;; - --enable-debug-tcg) debug_tcg=3D"yes" - ;; - --disable-debug-tcg) debug_tcg=3D"no" - ;; - --enable-debug) - # Enable debugging options that aren't excessively noisy - debug_tcg=3D"yes" - meson_option_parse --enable-debug-mutex "" - meson_option_add -Doptimization=3D0 - fortify_source=3D"no" - ;; - --enable-sanitizers) sanitizers=3D"yes" - ;; - --disable-sanitizers) sanitizers=3D"no" - ;; - --enable-tsan) tsan=3D"yes" - ;; - --disable-tsan) tsan=3D"no" - ;; - --disable-tcg) tcg=3D"disabled" - plugins=3D"no" - ;; - --enable-tcg) tcg=3D"enabled" - ;; - --disable-system) softmmu=3D"no" - ;; - --enable-system) softmmu=3D"yes" - ;; - --disable-user) - linux_user=3D"no" ; - bsd_user=3D"no" ; - ;; - --enable-user) ;; - --disable-linux-user) linux_user=3D"no" - ;; - --enable-linux-user) linux_user=3D"yes" - ;; - --disable-bsd-user) bsd_user=3D"no" - ;; - --enable-bsd-user) bsd_user=3D"yes" - ;; - --enable-pie) pie=3D"yes" - ;; - --disable-pie) pie=3D"no" - ;; - --enable-werror) werror=3D"yes" - ;; - --disable-werror) werror=3D"no" - ;; - --enable-stack-protector) stack_protector=3D"yes" - ;; - --disable-stack-protector) stack_protector=3D"no" - ;; - --enable-safe-stack) safe_stack=3D"yes" - ;; - --disable-safe-stack) safe_stack=3D"no" - ;; - --enable-cfi) - cfi=3D"true"; - meson_option_add -Db_lto=3Dtrue - ;; - --disable-cfi) cfi=3D"false" - ;; - --disable-fdt) fdt=3D"disabled" - ;; - --enable-fdt) fdt=3D"enabled" - ;; - --enable-fdt=3Dgit) fdt=3D"internal" - ;; - --enable-fdt=3D*) fdt=3D"$optarg" - ;; - --with-coroutine=3D*) coroutine=3D"$optarg" - ;; - --with-git=3D*) git=3D"$optarg" - ;; - --with-git-submodules=3D*) - git_submodules_action=3D"$optarg" - ;; - --enable-plugins) if test "$mingw32" =3D "yes"; then - error_exit "TCG plugins not currently supported on= Windows platforms" - else - plugins=3D"yes" - fi - ;; - --disable-plugins) plugins=3D"no" - ;; - --enable-containers) use_containers=3D"yes" - ;; - --disable-containers) use_containers=3D"no" - ;; - --gdb=3D*) gdb_bin=3D"$optarg" - ;; - --enable-vfio-user-server) vfio_user_server=3D"enabled" - ;; - --disable-vfio-user-server) vfio_user_server=3D"disabled" - ;; - # everything else has the same name in configure and meson - --*) meson_option_parse "$opt" "$optarg" - ;; - esac -done - -# test for any invalid configuration combinations -if test "$plugins" =3D "yes" -a "$tcg" =3D "disabled"; then - error_exit "Can't enable plugins on non-TCG builds" -fi - case $git_submodules_action in update|validate) if test ! -e "$source_path/.git"; then @@ -954,82 +1030,6 @@ for config in $mak_wilds; do fi done =20 -if test x"$show_help" =3D x"yes" ; then -cat << EOF - -Usage: configure [options] -Options: [defaults in brackets after descriptions] - -Standard options: - --help print this message - --prefix=3DPREFIX install in PREFIX [$prefix] - --target-list=3DLIST set target list (default: build all) -$(echo Available targets: $default_target_list | \ - fold -s -w 53 | sed -e 's/^/ /') - --target-list-exclude=3DLIST exclude a set of targets from the default t= arget-list - -Advanced options (experts only): - --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] - --cc=3DCC use C compiler CC [$cc] - --host-cc=3DCC use C compiler CC [$host_cc] for code run at - build time - --cxx=3DCXX use C++ compiler CXX [$cxx] - --objcc=3DOBJCC use Objective-C compiler OBJCC [$objcc] - --extra-cflags=3DCFLAGS append extra C compiler flags CFLAGS - --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags CXXFLAGS - --extra-objcflags=3DOBJCFLAGS append extra Objective C compiler flags OB= JCFLAGS - --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS - --cross-cc-ARCH=3DCC use compiler when building ARCH guest test ca= ses - --cross-cc-cflags-ARCH=3D use compiler flags when building ARCH guest t= ests - --cross-prefix-ARCH=3DPREFIX cross compiler prefix when building ARCH gu= est test cases - --make=3DMAKE use specified make [$make] - --python=3DPYTHON use specified python [$python] - --meson=3DMESON use specified meson [$meson] - --ninja=3DNINJA use specified ninja [$ninja] - --smbd=3DSMBD use specified smbd [$smbd] - --with-git=3DGIT use specified git [$git] - --with-git-submodules=3Dupdate update git submodules (default if .git = dir exists) - --with-git-submodules=3Dvalidate fail if git submodules are not up to da= te - --with-git-submodules=3Dignore do not update or check git submodules (= default if no .git dir) - --static enable static build [$static] - --bindir=3DPATH install binaries in PATH - --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] - --without-default-features default all --enable-* options to "disabled" - --without-default-devices do not include any device that is not needed = to - start the emulator (only use if you are includi= ng - desired devices in configs/devices/) - --with-devices-ARCH=3DNAME override default configs/devices - --enable-debug enable common debug build options - --enable-sanitizers enable default sanitizers - --enable-tsan enable thread sanitizer - --disable-werror disable compilation abort on warning - --disable-stack-protector disable compiler-provided stack protection - --cpu=3DCPU Build for host CPU [$cpu] - --with-coroutine=3DBACKEND coroutine backend. Supported options: - ucontext, sigaltstack, windows - --enable-plugins - enable plugins via shared library loading - --disable-containers don't use containers for cross-building - --gdb=3DGDB-path gdb to use for gdbstub tests [$gdb_bin] -EOF - meson_options_help -cat << EOF - system all system emulation targets - user supported user emulation targets - linux-user all linux usermode emulation targets - bsd-user all BSD usermode emulation targets - pie Position Independent Executables - modules modules support (non-Windows) - debug-tcg TCG debugging (default is disabled) - debug-info debugging information - safe-stack SafeStack Stack Smash Protection. Depends on - clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - -NOTE: The object files are built at the place where configure is launched -EOF -exit 0 -fi - # Remove old dependency files to make sure that they get properly regenera= ted rm -f ./*/config-devices.mak.d =20 --=20 2.30.2