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=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 97CFCC433EF for ; Wed, 8 Sep 2021 13:48:07 +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 190526113C for ; Wed, 8 Sep 2021 13:48:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 190526113C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:60942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNxvq-0004bh-21 for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 09:48:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNxuc-0003pl-SV for qemu-devel@nongnu.org; Wed, 08 Sep 2021 09:46:50 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNxuZ-0003hq-CF for qemu-devel@nongnu.org; Wed, 08 Sep 2021 09:46:50 -0400 Received: by mail-wr1-x42b.google.com with SMTP id u9so3392401wrg.8 for ; Wed, 08 Sep 2021 06:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tHB1qqCs0p0uDxMS1SRzXEtEfY0FF95ezm/ei5vwF0s=; b=SVeH21414gRCX9GIE35OCJEmkYZb6l9GnaIN3WO92S6P02MXR49bSogqnqITDoRXTT Ios59UNAN3Ic9mGjRDvU2dPszmZsngkx5SrnqBjG8pZhSzveVMfYFYS1zNHBYve5ejOE 4ed9fYzQGCWJtUousY7hD/3UYuxHhhnc0LsEKASnpoWMfuPO1vn/KwnD4f29uGA2LCNU FpMvJAYqXDW9VfBgZxz3JBzLaV+9G5/kOA7ucdiiWiiK0rwPZejhTrNNq1Q+uXWZiMeY RTUkkDTq9pKchd+vb0Bejg8F4GhfGNBqP2BX6orPWipO2DGpPgQowU/mb70EfMOdCfvC VtIA== 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:content-transfer-encoding; bh=tHB1qqCs0p0uDxMS1SRzXEtEfY0FF95ezm/ei5vwF0s=; b=JNLEmBdk6QaY3POwal2y4wEF9vwd+nhfL/1/raDPuDM1jnDvkxLBWvRdaOguZtWy5h rwJXPDpZRmf0dd7jdT6tyPG6Sr1cszrXvCcXc0iYCzECzomoP2jSf5CL/bZAODIHMbvH fzlpS613N06GzVDcnvhfTXjOcWVi/Wpo3bzXDhNkZV9FVCpKl0pqrLInW0P4DwSDWKE2 +qaWuls95gJwZ4AntM8pHOUsDo07HUyfMMbjJhYOsesPhv2l31Qcw9pWXyR43UL9d5J1 gbQL8abytC8YFWIbutItYniXZegBDgZznyi6I82w05cDGk/btIOfR4nTxU00a2/y01Fu QZOQ== X-Gm-Message-State: AOAM530b7+mI8e/hTgdjGAOA2Gx+k8hXqI0tbqVxzAZbCeTLwjN9rhbo 29Ryl0StqFPnNH/dPv1Seik6b+sFlsignHLiBuuM+w== X-Google-Smtp-Source: ABdhPJxPTjfRiP0HOcrw5gVg1H5hz54Jg6hfc9ddjLJ3yOrvOvZH44bGlBjhUmBoDrJC2WKNq71v95I+IDXyVE0nvaY= X-Received: by 2002:a5d:4a08:: with SMTP id m8mr4166868wrq.263.1631108805677; Wed, 08 Sep 2021 06:46:45 -0700 (PDT) MIME-Version: 1.0 References: <20210907121943.3498701-1-marcandre.lureau@redhat.com> <20210907121943.3498701-10-marcandre.lureau@redhat.com> In-Reply-To: <20210907121943.3498701-10-marcandre.lureau@redhat.com> From: Peter Maydell Date: Wed, 8 Sep 2021 14:45:56 +0100 Message-ID: Subject: Re: [RFC v3 09/32] build-sys: add i686 cpu target To: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , "Daniel P. Berrange" , QEMU Developers , Stefan Hajnoczi , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, 7 Sept 2021 at 13:37, wrote: > > From: Marc-Andr=C3=A9 Lureau > > Rust does not have i386 targets, so distinguish when target cpu is i686. > > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > configure | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/configure b/configure > index 8adf2127c3..48ff2837d9 100755 > --- a/configure > +++ b/configure > @@ -617,6 +617,8 @@ esac > if test ! -z "$cpu" ; then > # command line argument > : > +elif check_define __i686__ ; then > + cpu=3D"i686" > elif check_define __i386__ ; then > cpu=3D"i386" This isn't what the 'cpu' variable is attempting to distinguish. We care only about "is this the 32-bit Intel CPU family?", which we for convenience name "i386". We do not attempt (at least not in configure) to distinguish between different sub-flavours or versions of that 32-bit architecture. (Similarly, 'arm' just means "32-bit arm", and doesn't distinguish v5, v6, v7 or whatever.) As it happens the existing C codebase won't work on a classic i386 -- for instance the cpu_get_host_ticks() function for i386 host is implemented as the 'rdtsc' insn, which didn't come in until the pentium. For native compilation, I guess we should just assume that whatever rustc targets by default is the right thing. For cross compilation we probably need some mechanism for the user to tell us what the right rust cross target is, the same way we currently have them pass a --cross-prefix (which typically looks like a target-triple, but where the cpu part of the triple isn't necessarily the same thing as the 'cpu' variable configure is using. thanks -- PMM