From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CD6CC433EF for ; Fri, 17 Sep 2021 17:07:33 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFBF560F58 for ; Fri, 17 Sep 2021 17:07:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CFBF560F58 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bsdimp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:55210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRHKl-0004V6-O5 for qemu-devel@archiver.kernel.org; Fri, 17 Sep 2021 13:07:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRHI1-0002Sp-2j for qemu-devel@nongnu.org; Fri, 17 Sep 2021 13:04:41 -0400 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]:44825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRHHx-0005CC-PR for qemu-devel@nongnu.org; Fri, 17 Sep 2021 13:04:40 -0400 Received: by mail-vs1-xe2a.google.com with SMTP id c28so10037791vsh.11 for ; Fri, 17 Sep 2021 10:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yhUltIfnb0l0LBt+3gK+dbpoFSk4IcQJF3ZaWspCJhY=; b=XRl01+ORBgIwtnROrbA4M8cxp/AU1I6gNPqv1PK4bV9CTdjRSY/7PeTvK8oVeWNx2N +H5TLXlzw/E/84BZ0VCvoUab4d43hkMmYW/4UQWqVAX1jIjLcfC8uhaU6Zi1HoSbH0g8 a47UY5dfCYrhjniipivADtq986/8bGgt/CsPDP3/iDs1xfh5KVNZC1VZJU/q/db/6mHR utRxzlyPtToQsCJeGer0psJ9N0cBY6Gujlqh7i/WJIUNSEkknpV+AxLa45/sJyf2xH7k UwNCe+ugsnEcH/hkZbdMwa1P6DD0nLIUd2KiMgiz1Rhf6HsvslQp7xxlQfqtATUPCjAZ sVVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yhUltIfnb0l0LBt+3gK+dbpoFSk4IcQJF3ZaWspCJhY=; b=kAeQn29H1OAF8CjtvUGlv6q/kq3IcUxFkujBAPpfx9AQcLBXpYMmHFekxwesJ7weOC JOmEowUDwBzkpohev7XTo24DUhxDemf+MOS2HFaO4nV2mZ+Mxyo2mCrs9nBAcGsdB4gW LrWjA8LjAxhDuBMxnRHtj7BitI/HTxWFbr+ezFaC4sOpnckjzhvKREdrjm55IuQRsilU lMCR1LRu9ciKeF4gxYeku07c8wAfqesAkMKOjnpgnx6b9xkBhCikHOcIZQY4WXeiaKRA 17AqIYSnTOqZpwTVDZQXkqc81yGXgMNZ+qwem63XVy6f+bCuXOZiNSacRE6fI3EW1gNc IKsQ== X-Gm-Message-State: AOAM532JewlFK7pxX61LleEb+BcB9VYHMf5EOwR0hdE2x6x7hYYMIX2q jYtUndXW6JYDcUSlP+02QXEK25jAWmwBBAmDpTXBqg== X-Google-Smtp-Source: ABdhPJweKuFj0VV2dOcvwVKkyf+LhKNOPb7IuAsgnQTvno0Zpmywdrhg/8LCh6PwtDT/S8QLIdEiXc3GvORCKSsDBcU= X-Received: by 2002:a05:6102:1175:: with SMTP id k21mr9703222vsg.42.1631898276066; Fri, 17 Sep 2021 10:04:36 -0700 (PDT) MIME-Version: 1.0 References: <20210917162332.3511179-1-alex.bennee@linaro.org> <20210917162332.3511179-2-alex.bennee@linaro.org> In-Reply-To: <20210917162332.3511179-2-alex.bennee@linaro.org> From: Warner Losh Date: Fri, 17 Sep 2021 11:04:25 -0600 Message-ID: Subject: Re: [PATCH v1 01/11] configure: don't override the selected host test compiler if defined To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Content-Type: multipart/alternative; boundary="0000000000000e084e05cc33edcd" Received-SPF: none client-ip=2607:f8b0:4864:20::e2a; envelope-from=wlosh@bsdimp.com; helo=mail-vs1-xe2a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, "Daniel P. Berrange" , QEMU Developers , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , Stefan Hajnoczi , Cleber Rosa , Paolo Bonzini , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000000e084e05cc33edcd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2021 at 10:23 AM Alex Benn=C3=A9e = wrote: > There are not many cases you would want to do this but one is if you > want to use a test friendly compiler like gcc instead of a system > compiler like clang. Either way we should honour the users choice if > they have made it. > > Signed-off-by: Alex Benn=C3=A9e > Cc: Warner Losh > --- > configure | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > Reviewed-by: Warner Losh > diff --git a/configure b/configure > index 1043ccce4f..049c50a933 100755 > --- a/configure > +++ b/configure > @@ -1686,8 +1686,11 @@ case "$cpu" in > # No special flags required for other host CPUs > esac > > -eval "cross_cc_${cpu}=3D\$cc" > -cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" > +if eval test -z "\${cross_cc_$cpu}"; then > + eval "cross_cc_${cpu}=3D\$cc" > + cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" > +fi > + > QEMU_CFLAGS=3D"$CPU_CFLAGS $QEMU_CFLAGS" > > # For user-mode emulation the host arch has to be one we explicitly > -- > 2.30.2 > > --0000000000000e084e05cc33edcd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Sep 17, 2021 at 10:23 AM Alex= Benn=C3=A9e <alex.bennee@lina= ro.org> wrote:
There are not many cases you would want to do this but one is if you<= br> want to use a test friendly compiler like gcc instead of a system
compiler like clang. Either way we should honour the users choice if
they have made it.

Signed-off-by: Alex Benn=C3=A9e <alex.bennee@linaro.org>
Cc: Warner Losh <imp= @bsdimp.com>
---
=C2=A0configure | 7 +++++--
=C2=A01 file changed, 5 insertions(+), 2 deletions(-)
=
Reviewed-by: Warner Losh <imp@bsdimp.com>
=C2=A0
diff --git a/configure b/configure
index 1043ccce4f..049c50a933 100755
--- a/configure
+++ b/configure
@@ -1686,8 +1686,11 @@ case "$cpu" in
=C2=A0 =C2=A0 =C2=A0# No special flags required for other host CPUs
=C2=A0esac

-eval "cross_cc_${cpu}=3D\$cc"
-cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}"
+if eval test -z "\${cross_cc_$cpu}"; then
+=C2=A0 =C2=A0 eval "cross_cc_${cpu}=3D\$cc"
+=C2=A0 =C2=A0 cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" +fi
+
=C2=A0QEMU_CFLAGS=3D"$CPU_CFLAGS $QEMU_CFLAGS"

=C2=A0# For user-mode emulation the host arch has to be one we explicitly --
2.30.2

--0000000000000e084e05cc33edcd--