From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4345A43B73; Thu, 22 Feb 2024 10:37:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD07B402DA; Thu, 22 Feb 2024 10:37:24 +0100 (CET) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mails.dpdk.org (Postfix) with ESMTP id 93E6840281 for ; Thu, 22 Feb 2024 10:37:23 +0100 (CET) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-564fc495d83so1976210a12.0 for ; Thu, 22 Feb 2024 01:37:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1708594643; x=1709199443; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X6uG/to85aXS3CNVgP6rBIPW1O0ogeL6g8955CHxbd4=; b=Ea3wIthilt7yFFEvFqOVOZU24AwnC4+bkhMaP/L7gY9Qkyo7KTw2h+/nr7IAdKjG83 d45Nz66FxsqVcmIqAtR9d7VIsAioD0+aGLEUVEib27KGPnIIK9bEz25FfQjM+V0EzSlN Ae8CFNM3AxKR9OIDIh239SIU8NZ8e4LKAz8ZKc74gs/M4FMyBHysiaGCy89Si7z4qjK1 tMUqjJOtW3wPV/n9jvcBS/vA1iSI3abLvCiRQKSvHruZeATMRelwY6RHlumpS3Y8WK3K hl/bYRcw0JoYqMdyTQ+FREQpaWs4gcMjx50/qeehxf6JfzVVZcU5GQ2wwJHp+rzqY5Jc fUiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708594643; x=1709199443; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X6uG/to85aXS3CNVgP6rBIPW1O0ogeL6g8955CHxbd4=; b=YhmoZ6X+G/x2bhecqqi/ABGxWNgge6LghUh4QalId5/ebXmGgeoogjWLxQ8kie2r4L faVfuAWVRPA+i3lNTRn8VikknQn5N6ceYp3eajgAlI3fhzGI6S4dQa9TBBSoxtsVoW4m DgFBwyQVdEzS0mPgx74ZhQl7dsRxolBwwFqTb4r2o21a92zvd6EfYx91S/u4rYEXyWYM zhrU8zKWmKUV8+vgc4RfeEV4ldLcpuOSdkRVYJr97YZeZ26sdLFOaZkfry0N5FQ1Cf9C Z4oKXO/+HxfwsLIYcVYBIP9aGcEmI2dFaFzmI7rLwKlUPrWNfbmSCVZI504UYjH/O8r2 hzSg== X-Forwarded-Encrypted: i=1; AJvYcCWNvcT2qrw1r9AzfBengjFEood3KgeqE5hINn34P/huX0dMM8H0cy8JZZNoMgbWQhDMO1qC9E1r1XB7T3k= X-Gm-Message-State: AOJu0Yyby+WglsMKQtOT8XGJ2NhlkUYTeUG/2rL0cuJsOlKFpqpS7Roo ZXdnSs6jshqGbOSmcH4JoP7OMLD+lhVANCjxVKxzs7FipN3wiNkt0SMJEQ8E7C3E8reRPLqt/Sf xrHtdKG5GMsP2z1iWyHyNPO6n1MWBqQRSHEfYhA== X-Google-Smtp-Source: AGHT+IEb0fO1oqbEJ3kboGMyJ3ZO07jo3eVoQtfEhumGvbMVZH0htZrRUDU5i22/6zC6gP/QdHcONfSXkdKziH1WjWo= X-Received: by 2002:a17:906:5a98:b0:a3f:4ef6:2842 with SMTP id l24-20020a1709065a9800b00a3f4ef62842mr2536282ejq.17.1708594643191; Thu, 22 Feb 2024 01:37:23 -0800 (PST) MIME-Version: 1.0 References: <20240202085031.10237-1-pbhagavatula@marvell.com> <20240221202018.14179-1-pbhagavatula@marvell.com> In-Reply-To: <20240221202018.14179-1-pbhagavatula@marvell.com> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Thu, 22 Feb 2024 10:37:11 +0100 Message-ID: Subject: Re: [PATCH v4 1/3] config/arm: avoid mcpu and march conflicts To: pbhagavatula@marvell.com Cc: jerinj@marvell.com, nd@arm.com, wathsala.vithanage@arm.com, Ruifeng Wang , Bruce Richardson , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 36f21d2259..e77b696d8e 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -695,13 +698,31 @@ if update_flags > > machine_args = [] # Clear previous machine args > > + candidate_mcpu = '' > + if part_number_config.has_key('mcpu') > + mcpu = part_number_config['mcpu'] > + if (cc.has_argument('-mcpu=' + mcpu)) > + candidate_mcpu = mcpu > + endif > + endif > + > + march_features = [] > + if part_number_config.has_key('march_features') > + march_features += part_number_config['march_features'] > + endif > + if soc_config.has_key('extra_march_features') > + march_features += soc_config['extra_march_features'] > + endif > + > # probe supported archs and their features > candidate_march = '' > - if part_number_config.has_key('march') > + if part_number_config.has_key('march') and candidate_mcpu == '' If we reorganize the code a bit it would read better I think: if candidate_mcpu != '' elif part_number_config.has_key('march') else error(no mcpu and no march) # not sure whether this is needed or wanted though This would also match the order before - first process mcpu, then march. Come to think of it, maybe we should put the march_features code before the candidate_mcpu code since that is common code and would thus also read a bit better (common, then mcpu, then march). > if part_number_config.get('force_march', false) > - candidate_march = part_number_config['march'] > + if cc.has_argument('-march=' + part_number_config['march']) > + candidate_march = part_number_config['march'] > + endif > else > - supported_marchs = ['armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a', > + supported_marchs = ['armv9-a', 'armv8.6-a', 'armv8.5-a', 'armv8.4-a', 'armv8.3-a', > 'armv8.2-a', 'armv8.1-a', 'armv8-a'] > check_compiler_support = false > foreach supported_march: supported_marchs