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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6DC63C19F2D for ; Tue, 9 Aug 2022 09:56:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235278AbiHIJ45 (ORCPT ); Tue, 9 Aug 2022 05:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232210AbiHIJ4y (ORCPT ); Tue, 9 Aug 2022 05:56:54 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7034B2183A for ; Tue, 9 Aug 2022 02:56:53 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id j15so13739512wrr.2 for ; Tue, 09 Aug 2022 02:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=k85a0bXSQ4boikF7ms4EzVNwrE8oUSuo4lGCZguHQO8=; b=u89GziPisv5NpoojCbZiElOLks7PyY/IPUg7ekySMu41ESJms+PliUn9jEC+max26a goncSP5ca2Lh4qh3N8tyPjIZXw2jdl8UYcGB5wTUseiRc3OLM1Z+Rd2ugeWgLWAeu2Qq tXYcKp/d0ONAwPtlKvo6QuSiW9QDnVRnEwglUYhMz+l7RvJATb4tbgqMAQFESF38agcT UgLg+cfafIQ2jHRiGjak0xwyr0mlxJwtDlRbaHGEiOk9hPBaD6PhjSIpFPQSI6ZDnHkP 3HiwNG6/ltjigly8qQ1d3N+xCMJtx/TnbHhD8DSqZssomb4+O4P8mYrWycB4kNPp5Kbn TZYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=k85a0bXSQ4boikF7ms4EzVNwrE8oUSuo4lGCZguHQO8=; b=SeK87lzai0oKrBnX5p2HPdnDZqlybbL+K7IPnCaJVIKrOSyuCdoLPDl2fSuI7OtTEP Yz7+h3UvaRM6Xq3ioqqBvlj2MyQfPXaHkJ5MJXAjBDtK57YtOeyiGK5X/G6nndBgTtWL 67GeWsjKmz4EjzHmfx75H932N6I6mx5SX+zvddwGjZdSKen01hrMGNukofRk2puCMR8j 2baZ6nA7RrP+1qC70pkN/Qxv/PyOpmCHX8sCWiy5CPM881N4fhvLHlamMT6mUP8errNv X65RbxunHaSLyedBIyDziBx5Xwhd+O513R22L6FfbM6PeMo6gXuvvHDEtO0B+IA46nfC gqSg== X-Gm-Message-State: ACgBeo2F9pIIQJ2kldFixRUzsIJOsGS2u75X9gxFJLk5kV8lC8SoJnrW 0ueUQ0QFmXz7RKCZLsZGdbeD9IneG1w3tw== X-Google-Smtp-Source: AA6agR51uJT34Tj0yV3nHaQMYtPhq9SrvBGdwLYk+XsdBmTqZz7qyzHIQhXaXHD2uVZ1O7oStxKLUQ== X-Received: by 2002:a5d:588b:0:b0:220:68ce:8ae6 with SMTP id n11-20020a5d588b000000b0022068ce8ae6mr13066296wrf.527.1660039012034; Tue, 09 Aug 2022 02:56:52 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id e12-20020a5d65cc000000b002207a8773b7sm16143632wrw.27.2022.08.09.02.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Aug 2022 02:56:51 -0700 (PDT) Date: Tue, 9 Aug 2022 10:56:50 +0100 From: Jean-Philippe Brucker To: Alexandru Elisei Cc: will@kernel.org, kvm@vger.kernel.org, suzuki.poulose@arm.com, sami.mujawar@arm.com Subject: Re: [PATCH kvmtool 2/4] Makefile: Fix ARCH override Message-ID: References: <20220722141731.64039-1-jean-philippe@linaro.org> <20220722141731.64039-3-jean-philippe@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Mon, Jul 25, 2022 at 12:06:38PM +0100, Alexandru Elisei wrote: > Hi, > > Thank you for fixing this, I've come across it several times in the past. > > On Fri, Jul 22, 2022 at 03:17:30PM +0100, Jean-Philippe Brucker wrote: > > Variables set on the command-line are not overridden by normal > > assignments. So when passing ARCH=x86_64 on the command-line, build > > fails: > > > > Makefile:227: *** This architecture (x86_64) is not supported in kvmtool. > > > > Use the 'override' directive to force the ARCH reassignment. > > > > Signed-off-by: Jean-Philippe Brucker > > --- > > Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index f0df76f4..faae0da2 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -115,11 +115,11 @@ ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc.*/powerpc/ \ > > -e s/riscv64/riscv/ -e s/riscv32/riscv/) > > > > ifeq ($(ARCH),i386) > > As far as I know, there are several versions of the x86 architecture: i386, > i486, i586 and i686. The discovery from "uname -m" does "sed -e s/i.86/i386/" to catch those > It looks rather arbitrary to have i386 as a valid ARCH value, but not the other > ix86 versions. I wonder if we should just drop it and keep only x86 and x86_64, > like the kernel. "i386" does seem to be the conventional way of selecting 32-bit x86 in the kernel, since it has a i386_defconfig selected by ARCH=i386. > > Regardless, the patch looks good to me: > > Tested-by: Alexandru Elisei > Reviewed-by: Alexandru Elisei Thanks! Jean > > Thanks, > Alex > > > - ARCH := x86 > > + override ARCH = x86 > > DEFINES += -DCONFIG_X86_32 > > endif > > ifeq ($(ARCH),x86_64) > > - ARCH := x86 > > + override ARCH = x86 > > DEFINES += -DCONFIG_X86_64 > > ARCH_PRE_INIT = x86/init.S > > endif > > -- > > 2.37.1 > >