From nobody Mon Feb 9 14:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636361700456163.3518902947941; Mon, 8 Nov 2021 00:55:00 -0800 (PST) Received: from localhost ([::1]:39776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk0Qd-0004vf-IS for importer@patchew.org; Mon, 08 Nov 2021 03:54:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0N0-0005gd-PT for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:51:14 -0500 Received: from [2a00:1450:4864:20::12d] (port=38475 helo=mail-lf1-x12d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk0Mx-0004dR-G5 for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:51:13 -0500 Received: by mail-lf1-x12d.google.com with SMTP id x27so34434465lfu.5 for ; Mon, 08 Nov 2021 00:51:11 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id nb17sm7743211ejc.7.2021.11.08.00.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EIf6M5yko2Ugfg5Utn/QX2dWFQD1lepYf66MvhGUO5E=; b=g07NLSXA6kcto1EqVJpJvNQ0fWWOUSfKZgXsq5svAXyypFwsf47xPDRF7Aj8SoF2UT RbS7rbkTejXkliDSIj25of5hS7FcurJp1c8aqg+o/5dlScWXMrgHgEMJR41eeMfaARM3 iUBTzv+wf57lk2zvAUJlfvP/HcyFt4pc7dpfBvLs52wWw7GKAJCwJUWwWHZOTnqvVKIF ZZvwkSLirUCdwzCKsm80oCFxLB0udvArb0+2x53ygPVj0P8Nv0hfHXudNG68IfnyaZb3 NdpGq5PqsWGnLoh9GbuW3MwJLHrg+7IrrPAujElVrb5MpZ8ZhlXMTIpM2FYVomvw4eRF GEYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EIf6M5yko2Ugfg5Utn/QX2dWFQD1lepYf66MvhGUO5E=; b=cGMD2wgE1gXycgmdb3+L2cQ+otD3ko+Vk3oBGOtjqpriRmWICKsDRXP166SOlwmTRC IS74tDtBS29yjVmFhhoj032388bVyYx7oxpZkCIsHdNYHgYhQmrMO2lLN2GSyF4Tc5Ok F4zTxzYYDD2mNbhfgCeZ42C3luJXbPAv5b4F/SY3uioaMSsQaz3ZeQKlExLAzVj5NtPc mDzB0f4x5FNAFqQnGRJUQFRzaluTTlMba2oIxi67yJBsNWi5pSG2Ji+P9lKwq+TirJtx zOMXn0iESiAXvqFrroCkM/nlko1EbyOiBBnP0tOwJSCJUKaFQW+VF/y+EBVF3A29q6lO t5mA== X-Gm-Message-State: AOAM533/Y8gtFBUEArCYJ36j9WLKQeCcNtgvG6xOPaKBJRcItIgxSxUF fKxVuCB3KMMVkz/vXcvKNJYckHHHlwA= X-Google-Smtp-Source: ABdhPJxPXPpRyw3+vVTc4VUvVQW8NDhP00j8Wx4kcMkuaQmf7s1ndaicm81qO8GGAkD6zTlV2AW2SA== X-Received: by 2002:a05:6402:350b:: with SMTP id b11mr48191190edd.184.1636361004870; Mon, 08 Nov 2021 00:43:24 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 1/4] configure: simplify calls to meson_quote Date: Mon, 8 Nov 2021 09:43:19 +0100 Message-Id: <20211108084323.541961-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108084323.541961-1-pbonzini@redhat.com> References: <20211108084323.541961-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12d (failed) 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=2a00:1450:4864:20::12d; envelope-from=paolo.bonzini@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1636361701271000001 Content-Type: text/plain; charset="utf-8" meson_quote assumes a non-empty argument list, and incorrectly returns a one-entry array if passed nothing. Move the check for an empty argument list from the invocations to the function itself. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 33682cb971..369b5455b6 100755 --- a/configure +++ b/configure @@ -3894,6 +3894,7 @@ echo "TOPSRC_DIR=3D$source_path" >> $config_mak if test "$skip_meson" =3D no; then cross=3D"config-meson.cross.new" meson_quote() { + test $# =3D 0 && return echo "'$(echo $* | sed "s/ /','/g")'" } =20 @@ -3908,10 +3909,10 @@ if test "$skip_meson" =3D no; then =20 test -z "$cxx" && echo "link_language =3D 'c'" >> $cross echo "[built-in options]" >> $cross - echo "c_args =3D [${CFLAGS:+$(meson_quote $CFLAGS)}]" >> $cross - echo "cpp_args =3D [${CXXFLAGS:+$(meson_quote $CXXFLAGS)}]" >> $cross - echo "c_link_args =3D [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross - echo "cpp_link_args =3D [${LDFLAGS:+$(meson_quote $LDFLAGS)}]" >> $cross + echo "c_args =3D [$(meson_quote $CFLAGS)]" >> $cross + echo "cpp_args =3D [$(meson_quote $CXXFLAGS)]" >> $cross + echo "c_link_args =3D [$(meson_quote $LDFLAGS)]" >> $cross + echo "cpp_link_args =3D [$(meson_quote $LDFLAGS)]" >> $cross echo "[binaries]" >> $cross echo "c =3D [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross test -n "$cxx" && echo "cpp =3D [$(meson_quote $cxx $CPU_CFLAGS)]" >> $c= ross --=20 2.33.1 From nobody Mon Feb 9 14:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636361607812836.392449973267; Mon, 8 Nov 2021 00:53:27 -0800 (PST) Received: from localhost ([::1]:34444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk0P9-0001Lg-5V for importer@patchew.org; Mon, 08 Nov 2021 03:53:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36590) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0N8-0006Cf-Hd for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:51:22 -0500 Received: from [2a00:1450:4864:20::129] (port=43847 helo=mail-lf1-x129.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk0Mv-0004cl-4B for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:51:22 -0500 Received: by mail-lf1-x129.google.com with SMTP id b40so5029513lfv.10 for ; Mon, 08 Nov 2021 00:51:08 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id nb17sm7743211ejc.7.2021.11.08.00.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SxNQ2oSyayGtLSH54POjOn+Otcw6do72wkhK/MMow3g=; b=f5LKawvRqF7YTK+AMSUgiGqBeMiY/Qq1/3yB6T0ylmnomVI083U65Xl+c1fbrLKmRw ZpXnfK5/ACTYlBTUlkFQ+2Y8qSJerwsLUdzF32rslj9+WkK23bAOLaFnePnEbmsatas5 UAuuTf3Z3HJ74Ig98l2leTDlGQvivCkNfzAZ26bJBN96yrdCu37Gp7eisNOh4B1jckkF PCaSvR5sOKme8LVEkAeFFN2P6eZrvA5+MdSYkt5VRmNsaW5QYDp3vz/fnIvhUPHd/Qh3 k4oYcK8n3FququLBfJqLlt69enZHokWEIWmjrl9/H9vPaX81CsRsDmUIrHsAL5NIOkpN cLjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=SxNQ2oSyayGtLSH54POjOn+Otcw6do72wkhK/MMow3g=; b=6URKbrxjVMQBzf+pustA75N7gFj9lGjhPQ4Z86QmziikGjFLL3a1iFnOCRa25ol/6p s01ji/mlsP3ut8luvVERt+CcxeKBAw+QiNN8EDGRkqOr6Hl3W3sXTwd+t/LDPdbMoXm3 scYAyjUqvHyzwlDvtrlaUfS9IAfEQ5pQK5o54dYMo3J1OyJNRbSDx8TV4C7Hwuh+u/8c eL0G3zV9pf48xRlPPQMauuIWLvqy6wjeiO91jT40QBFWv9+68deVSov2gULDSfdYkgv/ m2NPRWqaTqnxjBG4jgzi12/Mf34tjTTR3bHXxyfDRm8/GtzADYr+oJZw+avlij3FsmuQ x7kw== X-Gm-Message-State: AOAM532mc3JZxxKteiyiv18wlg5Zmu7cH2kHuqNnOrcdyQ5wQ81q558w HI+8wCIcjphZNN8lXN3gdpqNgSa2Bhc= X-Google-Smtp-Source: ABdhPJzsTUORz/SJGZTFxZC65j7YXlb+wNK0JYHon6ithBgkgGy9cO58+7m/n/3THNwyyV6Y6RUG4g== X-Received: by 2002:aa7:c34d:: with SMTP id j13mr90691248edr.308.1636361005649; Mon, 08 Nov 2021 00:43:25 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 2/4] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status Date: Mon, 8 Nov 2021 09:43:20 +0100 Message-Id: <20211108084323.541961-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108084323.541961-1-pbonzini@redhat.com> References: <20211108084323.541961-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::129 (failed) 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=2a00:1450:4864:20::129; envelope-from=paolo.bonzini@gmail.com; helo=mail-lf1-x129.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1636361609141000003 Content-Type: text/plain; charset="utf-8" CFLAGS, CXXFLAGS and LDFLAGS influence the tests (for example if they inclu= de -L or -I options), so they should be kept from the invocation of configure to the subsequent reinvocations via config.status. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 369b5455b6..d268f59246 100755 --- a/configure +++ b/configure @@ -4057,9 +4057,12 @@ preserve_env AR preserve_env AS preserve_env CC preserve_env CPP +preserve_env CFLAGS preserve_env CXX +preserve_env CXXFLAGS preserve_env INSTALL preserve_env LD +preserve_env LDFLAGS preserve_env LD_LIBRARY_PATH preserve_env LIBTOOL preserve_env MAKE --=20 2.33.1 From nobody Mon Feb 9 14:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636361624941962.6252485342646; Mon, 8 Nov 2021 00:53:44 -0800 (PST) Received: from localhost ([::1]:35768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk0PQ-0002FC-9E for importer@patchew.org; Mon, 08 Nov 2021 03:53:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0Mj-0004zh-UV for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:50:57 -0500 Received: from [2a00:1450:4864:20::52f] (port=36863 helo=mail-ed1-x52f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk0Mg-00049n-Td for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:50:57 -0500 Received: by mail-ed1-x52f.google.com with SMTP id o8so59319987edc.3 for ; Mon, 08 Nov 2021 00:50:54 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id nb17sm7743211ejc.7.2021.11.08.00.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d32zZr3Lg4xmu+J9Aeiyv7F9dvPxwAsvpGCMhgRyfRk=; b=GfuwPR+dfL2BFvkUqDjADReFVl4xp1XiEax1R8nPWEMf4EPWZw90t5yGPSFidmoi4s YqwRFi34KtbnDISIEI73s+j3mBvHQej3xGymuprG9uqpYonEZQgv2ikA4xGvwbwdGvMO hOMy59vXaB1pmr1ZgJyPT4q1zoWSSxXqDfnth5MgAqpmDQtxaNUAtBvfTOxSmUTfK0v/ ++ilrx5dZSCiH7mnKwGIcmiYjI+kHs+Oih6XDd9AWWv7nR/UF1NTQlRl/e15iJRMqBim ZDd23C36VjyG9WA94D3m+5kHLEThzZ1zDt9BStfjGyoP/9o1TKkPw3x60OH6gALw8F4+ 7Hjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=d32zZr3Lg4xmu+J9Aeiyv7F9dvPxwAsvpGCMhgRyfRk=; b=z3NM+OwcLKWFv/QAHqApBPseMGRU6tr8g9bG/+59Q/NXU/vVTZLC0+zW6AYvv8i8er XRP1MiZJ9hS+/rBYGLYTQ08Owknp3hiYAjBtQRGUkT5WPLR3h+hMm386oAg1AIN6GSMA mZG79gXEjflaPqKBfespJwtIN27yGaZ0hKDBcuHkf2RZMW9Fn8Cg/TS1eoA7sAtUiEnm 4C3ActCbwTDglmyY3R4UnfceMqP5ny4zmq9K1KOGuDLR2prpYgAHRHQPeGNDYe9c/4jc GjLa0eVVkfrEAHrxorgHfkgDFGHsSO6vNVOInPiA0qoEWhglUgj+5gleHalaOqqNC1XV Zi4w== X-Gm-Message-State: AOAM532x6vdFRUmkxBY1uuYqQJ/kcnqxb1col5v4YApQ1L80l7b+A3Px hPZTCkQumF9RJ1DxcXmEWECqWfGSyIE= X-Google-Smtp-Source: ABdhPJwhhI9H/kjJve2PeRHx6mRGi7Cl+oVx3DMROpP5Azzw6PKo7wLqCuu2Z8UwJlaPRA//sMusTw== X-Received: by 2002:aa7:d3cf:: with SMTP id o15mr26286143edr.265.1636361006310; Mon, 08 Nov 2021 00:43:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 3/4] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests Date: Mon, 8 Nov 2021 09:43:21 +0100 Message-Id: <20211108084323.541961-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108084323.541961-1-pbonzini@redhat.com> References: <20211108084323.541961-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52f (failed) 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=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1636361625174000001 Content-Type: text/plain; charset="utf-8" Meson (intentionally) does not add QEMU_CFLAGS to cc.compiles/cc.links tests, as they are supposed to be independent of the specific sets of compilation flags used to build the programs. However, the user can still use CFLAGS or the toolchain file's LANG_args/LANG_link_args option to specify -I or -L options that apply to cc.compiles/cc.links as well. This is also the intended use of configure's --extra-cflags, --extra-cxxflags and --extra-ldflags options. For example, if one has netmap's header in a nonstandard directory, up to commit 837b84b1c078bf3e909 it used to work fine to do: .../configure --enable-netmap \ --extra-cflags=3D-I/path/to/netmap/sys but since the test was converted to meson, this does not work anymore. Pass these options to meson via the toolchain file instead of via config-host.mak, since the toolchain file's variables have the same purpose as configure's --extra-*flags arguments. Reported-by: Owen LaGarde Reported-by: Thomas Huth Fixes: 47b30835e4 ("configure: consistently pass CFLAGS/CXXFLAGS/LDFLAGS to= meson", 2020-10-06) Signed-off-by: Paolo Bonzini --- configure | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/configure b/configure index d268f59246..1ea26c67e5 100755 --- a/configure +++ b/configure @@ -174,14 +174,14 @@ update_cxxflags() { =20 compile_object() { local_cflags=3D"$1" - do_cc $CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -c -o $TMPO $= TMPC + do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -c -o $TMPO $TMPC } =20 compile_prog() { local_cflags=3D"$1" local_ldflags=3D"$2" - do_cc $CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags -o $TMPE $TMP= C \ - $LDFLAGS $CONFIGURE_LDFLAGS $QEMU_LDFLAGS $local_ldflags + do_cc $CFLAGS $EXTRA_CFLAGS $CONFIGURE_CFLAGS $QEMU_CFLAGS $local_cflags= -o $TMPE $TMPC \ + $LDFLAGS $EXTRA_LDFLAGS $CONFIGURE_LDFLAGS $QEMU_LDFLAGS $local_ldfl= ags } =20 # symbolically link $1 to $2. Portable version of "ln -sf". @@ -286,6 +286,10 @@ for opt do esac done =20 +EXTRA_CFLAGS=3D"" +EXTRA_CXXFLAGS=3D"" +EXTRA_LDFLAGS=3D"" + xen_ctrl_version=3D"$default_feature" xfs=3D"$default_feature" membarrier=3D"$default_feature" @@ -394,13 +398,13 @@ for opt do ;; --cpu=3D*) cpu=3D"$optarg" ;; - --extra-cflags=3D*) QEMU_CFLAGS=3D"$QEMU_CFLAGS $optarg" - QEMU_LDFLAGS=3D"$QEMU_LDFLAGS $optarg" + --extra-cflags=3D*) + EXTRA_CFLAGS=3D"$EXTRA_CFLAGS $optarg" + EXTRA_CXXFLAGS=3D"$EXTRA_CXXFLAGS $optarg" + ;; + --extra-cxxflags=3D*) EXTRA_CXXFLAGS=3D"$EXTRA_CXXFLAGS $optarg" ;; - --extra-cxxflags=3D*) QEMU_CXXFLAGS=3D"$QEMU_CXXFLAGS $optarg" - ;; - --extra-ldflags=3D*) QEMU_LDFLAGS=3D"$QEMU_LDFLAGS $optarg" - EXTRA_LDFLAGS=3D"$optarg" + --extra-ldflags=3D*) EXTRA_LDFLAGS=3D"$EXTRA_LDFLAGS $optarg" ;; --enable-debug-info) debug_info=3D"yes" ;; @@ -1346,8 +1350,8 @@ Advanced options (experts only): 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 QEMU_CFLAGS - --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS + --extra-cflags=3DCFLAGS append extra C compiler flags CFLAGS + --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags CXXFLAGS --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS --cross-cc-ARCH=3DCC use compiler when building ARCH guest test ca= ses --cross-cc-flags-ARCH=3D use compiler flags when building ARCH guest t= ests @@ -3402,7 +3406,7 @@ EOF =20 update_cxxflags =20 - if do_cxx $CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS -o $TMPE $TMPCX= X $TMPO $QEMU_LDFLAGS; then + if do_cxx $CXXFLAGS $EXTRA_CXXFLAGS $CONFIGURE_CXXFLAGS $QEMU_CXXFLAGS= -o $TMPE $TMPCXX $TMPO $QEMU_LDFLAGS; then # C++ compiler $cxx works ok with C compiler $cc : else @@ -3909,10 +3913,10 @@ if test "$skip_meson" =3D no; then =20 test -z "$cxx" && echo "link_language =3D 'c'" >> $cross echo "[built-in options]" >> $cross - echo "c_args =3D [$(meson_quote $CFLAGS)]" >> $cross - echo "cpp_args =3D [$(meson_quote $CXXFLAGS)]" >> $cross - echo "c_link_args =3D [$(meson_quote $LDFLAGS)]" >> $cross - echo "cpp_link_args =3D [$(meson_quote $LDFLAGS)]" >> $cross + echo "c_args =3D [$(meson_quote $CFLAGS $EXTRA_CFLAGS)]" >> $cross + echo "cpp_args =3D [$(meson_quote $CXXFLAGS $EXTRA_CXXFLAGS)]" >> $cross + echo "c_link_args =3D [$(meson_quote $LDFLAGS $EXTRA_LDFLAGS)]" >> $cross + echo "cpp_link_args =3D [$(meson_quote $LDFLAGS $EXTRA_LDFLAGS)]" >> $cr= oss echo "[binaries]" >> $cross echo "c =3D [$(meson_quote $cc $CPU_CFLAGS)]" >> $cross test -n "$cxx" && echo "cpp =3D [$(meson_quote $cxx $CPU_CFLAGS)]" >> $c= ross --=20 2.33.1 From nobody Mon Feb 9 14:34:32 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636361596494418.21949628073685; Mon, 8 Nov 2021 00:53:16 -0800 (PST) Received: from localhost ([::1]:33342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk0Ox-0000c3-Px for importer@patchew.org; Mon, 08 Nov 2021 03:53:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk0MZ-0004eT-CF for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:50:49 -0500 Received: from [2a00:1450:4864:20::12c] (port=34593 helo=mail-lf1-x12c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk0MU-0003hM-2t for qemu-devel@nongnu.org; Mon, 08 Nov 2021 03:50:47 -0500 Received: by mail-lf1-x12c.google.com with SMTP id u11so34489600lfs.1 for ; Mon, 08 Nov 2021 00:50:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id nb17sm7743211ejc.7.2021.11.08.00.43.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 00:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JfMAiceoomjlqsAnaVtSpe+RW+YX7W3jh6X67XyGhKM=; b=IpPG0pBX5EkQMog25VnrjQZr7PsRdeCE+kbsOWGqESuRFY3Ace1Zk925LHyjfPQt8J j2nzbdHfIVEYv/2rdQV52jdwTX11gLfAb7RLGnr5VhZprkS+oTCdM3JR71MhGC/Qtie4 RiEZzDuYyql/hDyz4FPxEp+k1QoBnJQYwkZbAYzASy7+C6BrISQ58NmOB/rHW9lEAx2m Hr+34p3RIu1fDqPR9hh8uYwfKq5vwMOkceR4w+8+8WyOjFgjFR5OXLjLYf+B9zlIFwty 6EECP0PBfAOcK8KCJ+N5rwjMq4uOQeGBgCRosVukMtq2Zvc5LrARmjjkAAy4HcivsEFn XdXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JfMAiceoomjlqsAnaVtSpe+RW+YX7W3jh6X67XyGhKM=; b=aIU+FPnlhHxiXbnJpAkpD93mnxnsilUZcC31HZr5DfLoipBvDcq6n6QtXZ4ksVe9D9 TCmwSu3OsYICeDzmgKzqjsjGE+ZdPP4fNeQb/iokurXONc9e4nqcRCMfC14xuqtX4Qvt GJoZmm7xbUWniXFQrCizbb0Tb6Mgov+PZgzZrNdJVnC+chL51shxOOsZ0yPhIr+AzBQv hUm9T1pndyl1bGQshPw9gT1ruqZlI89m1wKQrL5es2qcvwuyKhIqwwzvNXffpKLE3bJh XophfVCSVhyeyDg/2CsjAakDzYUH8nF7U9krezKwKqFmZHuXUnX8SO647p3RMlfLL71O PD3A== X-Gm-Message-State: AOAM53137er0pGpW00ttrnsnLdzqYeMYL796s2m/urQ5ZsRoxXeTpAUA CDCOZoHsOLbSMem/2jL1LdPniwNIFsg= X-Google-Smtp-Source: ABdhPJyAAo5BI7781CCz2xDxsJVe53u6ZC7Np9OxDMQDp4YPfEkfeyqqqqmtgRpdtLVzd3Jo/MPMrA== X-Received: by 2002:a05:6402:2690:: with SMTP id w16mr40966803edd.220.1636361006981; Mon, 08 Nov 2021 00:43:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 4/4] configure: ignore preexisting QEMU_*FLAGS envvars Date: Mon, 8 Nov 2021 09:43:22 +0100 Message-Id: <20211108084323.541961-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211108084323.541961-1-pbonzini@redhat.com> References: <20211108084323.541961-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12c (failed) 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=2a00:1450:4864:20::12c; envelope-from=paolo.bonzini@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=no 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: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1636361597135000001 Content-Type: text/plain; charset="utf-8" User flags should be passed via CFLAGS/CXXFLAGS/LDFLAGS, or --extra-cflags/extra-cxxflags/--extra-ldflags on the command line. QEMU_CFLAGS, QEMU_CXXFLAGS and QEMU_LDFLAGS are reserved for flags detected by configure, so do not add to them and clear them at the beginning of the script. Signed-off-by: Paolo Bonzini Reviewed-by: Thomas Huth --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1ea26c67e5..2048a52b20 100755 --- a/configure +++ b/configure @@ -158,7 +158,7 @@ update_cxxflags() { # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those # options which some versions of GCC's C++ compiler complain about # because they only make sense for C programs. - QEMU_CXXFLAGS=3D"$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS -D__STDC_CONSTAN= T_MACROS -D__STDC_FORMAT_MACROS" + QEMU_CXXFLAGS=3D"-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__ST= DC_FORMAT_MACROS" CONFIGURE_CXXFLAGS=3D$(echo "$CONFIGURE_CFLAGS" | sed s/-std=3Dgnu11/-= std=3Dgnu++11/) for arg in $QEMU_CFLAGS; do case $arg in @@ -465,11 +465,13 @@ sdl2_config=3D"${SDL2_CONFIG-${cross_prefix}sdl2-conf= ig}" # left shift of signed integers is well defined and has the expected # 2s-complement style results. (Both clang and gcc agree that it # provides these semantics.) -QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS" +QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv" QEMU_CFLAGS=3D"-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = $QEMU_CFLAGS" =20 +QEMU_LDFLAGS=3D + # Flags that are needed during configure but later taken care of by Meson CONFIGURE_CFLAGS=3D"-std=3Dgnu11 -Wall" CONFIGURE_LDFLAGS=3D --=20 2.33.1