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 31E1843BA4; Fri, 23 Feb 2024 12:19:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A5B0740A77; Fri, 23 Feb 2024 12:19:40 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id E4893402E3 for ; Fri, 23 Feb 2024 12:19:38 +0100 (CET) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-565468bec51so1357061a12.1 for ; Fri, 23 Feb 2024 03:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1708687177; x=1709291977; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tGjPxdKUmLgXiH/R+hxnVcN/6wl7muuiRzYXMHVSdRo=; b=O6Ai/tbqj2RyEIUozlx7O6OxKCjMsIntY1hZlPMGHu7oJe3Yy0yXgWQ8ojeeHnLydO mlQo9JSV+VDlnacFt0u8wF9rlUudrumtJw7gWiLxoTabGvEJ/OTv6zOK25B5SCtOBenQ envnGCJlPeV+N7NGPpjcjdlecLKnjrgPWnbseXFpelGL0L4e91jUa19TX9jFiFzOp9aS KK67p47jKaoZa6PjOZloVjBxxgwF5S39F0vJvdqNuGTNaI5JmogjVm+JxfQqeK+H9Haz LPeeqHjklZ33TmZLvMoPjnHf8qQHS64dDAjJSNx0b1SooxrR93IglA/XIFmF7le1i+FF iVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708687177; x=1709291977; h=content-transfer-encoding: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=tGjPxdKUmLgXiH/R+hxnVcN/6wl7muuiRzYXMHVSdRo=; b=eBFNMHlNd5yZPpcMHBdk4z1x9fJkpdq0Xv6vSkJ90dnpq8cDIoXPL0t/nOQkycBeSu WIh0d9t6HFajNQvo7lxRlpn1rvUj0H/jQ6HCrqR+w72y0oNRgAlV3iUGb+01rXJ5eRwn d4TGEQSBQlfYyNxp8gKWkHAl2Tfii5pY/cU01ULZaEejKL3UaSJFF+Aa7bm+o35t97Bm pvrhUnnPjtxJHYhlbbBinlgpGrWcheWwuGKwOLyZKeKG7rI9a6V0InOCvVKN5xoZ3Zx9 yDbhMukH+Be1RIy89BO6IC/GrDra5GyjgvT7HQxcWLCIhx3Za2crgHtz7CXseiSFrw88 52ng== X-Forwarded-Encrypted: i=1; AJvYcCXTTEAuZ9/QQb1Yz7dVdF/AuaKJa2384w/64Q+G06RUhO2IldqVx2LzTY9MifwPXYiLQShBe3W3PsGJnxQ= X-Gm-Message-State: AOJu0Yy2VWTaRJgfFOPGf00QVvm3sSxCAbJxc/4JouaPGMPvKr20SUDw 3VwqVsG8lIrnTJQcsflHil/WpnDH9Uyg69vFU4pqaHwFO5HjgsAzQv2DmQDowfa5qnNyQ+SIcdz kZDC65QxPwkj/Wqs+hN0S0E0srzKayhTEeGqekg== X-Google-Smtp-Source: AGHT+IE8Wknf19P8OW5921cSdatYOoYwTmEqlf6KaKloPzgJRjLu0rdxAlj7Q6hVCzThmFstWblxpYQh3wSaW9YQzDo= X-Received: by 2002:a05:6402:704:b0:565:2e3d:d019 with SMTP id w4-20020a056402070400b005652e3dd019mr1399296edx.4.1708687176804; Fri, 23 Feb 2024 03:19:36 -0800 (PST) MIME-Version: 1.0 References: <20240221202018.14179-1-pbhagavatula@marvell.com> <20240222124503.17043-1-pbhagavatula@marvell.com> In-Reply-To: <20240222124503.17043-1-pbhagavatula@marvell.com> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Fri, 23 Feb 2024 12:19:25 +0100 Message-ID: Subject: Re: [PATCH v5 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" Content-Transfer-Encoding: quoted-printable 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 Other than the one point below, Reviewed-by: Juraj Linke=C5=A1 > diff --git a/config/arm/meson.build b/config/arm/meson.build > index 36f21d2259..d05d54b564 100644 > --- a/config/arm/meson.build > +++ b/config/arm/meson.build > @@ -695,13 +698,37 @@ if update_flags > > machine_args =3D [] # Clear previous machine args > > - # probe supported archs and their features > + march_features =3D [] > + if part_number_config.has_key('march_features') > + march_features +=3D part_number_config['march_features'] > + endif > + if soc_config.has_key('extra_march_features') > + march_features +=3D soc_config['extra_march_features'] > + endif > + > + candidate_mcpu =3D '' > candidate_march =3D '' > - if part_number_config.has_key('march') > + > + if part_number_config.has_key('mcpu') and > + cc.has_argument('-mcpu=3D' + part_number_config['mcpu']) > + candidate_mcpu =3D '-mcpu=3D' + part_number_config['mcpu'] > + foreach feature: march_features > + if cc.has_argument('+'.join([candidate_mcpu, feature])) > + candidate_mcpu =3D '+'.join([candidate_mcpu, feature]) > + else > + warning('The compiler does not support feature @0@' > + .format(feature)) > + endif > + endforeach > + machine_args +=3D candidate_mcpu > + elif part_number_config.has_key('march') > + # probe supported archs and their features > if part_number_config.get('force_march', false) > - candidate_march =3D part_number_config['march'] > + if cc.has_argument('-march=3D' + part_number_config['march'= ]) > + candidate_march =3D part_number_config['march'] > + endif The check was omitted here by design because aarch32 builds with some compilers don't support -march=3Darmv8-a alone, only with -mfpu=3D as well. > else > - supported_marchs =3D ['armv8.6-a', 'armv8.5-a', 'armv8.4-a',= 'armv8.3-a', > + supported_marchs =3D ['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 =3D false > foreach supported_march: supported_marchs > @@ -717,32 +744,31 @@ if update_flags > endif > endforeach > endif > - if candidate_march =3D=3D '' > - error('No suitable armv8 march version found.') > - endif > + > if candidate_march !=3D part_number_config['march'] > - warning('Configuration march version is ' + > - '@0@, but the compiler supports only @1@.' > - .format(part_number_config['march'], candidate_march= )) > + warning('Configuration march version is @0@, not supported.' > + .format(part_number_config['march'])) > + if candidate_march !=3D '' > + warning('Using march version @0@.'.format(candidate_marc= h)) > + endif > endif > - candidate_march =3D '-march=3D' + candidate_march > > - march_features =3D [] > - if part_number_config.has_key('march_features') > - march_features +=3D part_number_config['march_features'] > - endif > - if soc_config.has_key('extra_march_features') > - march_features +=3D soc_config['extra_march_features'] > + if candidate_march !=3D '' > + candidate_march =3D '-march=3D' + candidate_march > + foreach feature: march_features > + if cc.has_argument('+'.join([candidate_march, feature])) > + candidate_march =3D '+'.join([candidate_march, featu= re]) > + else > + warning('The compiler does not support feature @0@' > + .format(feature)) > + endif > + endforeach > + machine_args +=3D candidate_march > endif > - foreach feature: march_features > - if cc.has_argument('+'.join([candidate_march, feature])) > - candidate_march =3D '+'.join([candidate_march, feature]) > - else > - warning('The compiler does not support feature @0@' > - .format(feature)) > - endif > - endforeach > - machine_args +=3D candidate_march > + endif > + > + if candidate_mcpu =3D=3D '' and candidate_march =3D=3D '' > + error('No suitable ARM march/mcpu version found.') > endif > > # apply supported compiler options > -- > 2.25.1 >