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 08C77C433EF for ; Mon, 25 Jul 2022 11:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234868AbiGYLGL (ORCPT ); Mon, 25 Jul 2022 07:06:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234575AbiGYLGK (ORCPT ); Mon, 25 Jul 2022 07:06:10 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F9E813F7E for ; Mon, 25 Jul 2022 04:06:09 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 996B6D6E; Mon, 25 Jul 2022 04:06:09 -0700 (PDT) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0E7263F73B; Mon, 25 Jul 2022 04:06:07 -0700 (PDT) Date: Mon, 25 Jul 2022 12:06:38 +0100 From: Alexandru Elisei To: Jean-Philippe Brucker 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: <20220722141731.64039-3-jean-philippe@linaro.org> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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. 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. Regardless, the patch looks good to me: Tested-by: Alexandru Elisei Reviewed-by: Alexandru Elisei 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 >