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 5D1D042354; Fri, 13 Oct 2023 09:35:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33DD3402DA; Fri, 13 Oct 2023 09:35:16 +0200 (CEST) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) by mails.dpdk.org (Postfix) with ESMTP id C754C4028C for ; Fri, 13 Oct 2023 09:35:13 +0200 (CEST) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-9ad8a822508so292749166b.0 for ; Fri, 13 Oct 2023 00:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1697182513; x=1697787313; 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=mdEnQ1AXd1QpG+j0Hg3Q0Gc3219GrIFxJx5vzxVFDp0=; b=u9+1ZLEGYeAbNpFhq3dR0Pyaobtjm9/XhVSet8h40g2Jg63idGiqpyrGALZhf1qw42 ZYxElBjYlXeMvxY/0j4yTL1r7pb08xeesD5l/AADsI/ZmFIm/ZKGPMoHnMsBEAYrEc/D 2imuUgs/V1ITdQCQK9J0pSElrQYe0a0w8Lj7A6kgMvAfXBPTEV9Mc9gtGWSKV1chK1zw atT4PgjJrUOwJgI0yPmv2Jx/RoT6KDZC2B2zz7yZ3o9e13KNPY//SVmOOwxDcVZjcHz7 OEahOIOLMd6wUxP7sA+XW8q0RS/19TDDNLs8fts9Ny88snKmy6y37lMt970BCUtJL5zb UpvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697182513; x=1697787313; 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=mdEnQ1AXd1QpG+j0Hg3Q0Gc3219GrIFxJx5vzxVFDp0=; b=uq41celODsixOulqkTyV2TyLIjddDTESvL0E7lP1FYn4x6x2Tkx6EiuBB5nw85bxX7 JxtdsNhSZD3NoYFjt4m+xkHoCVRcFj9SCD0jSmfYdPWMZl9xNXNfH3/5eH9ObNSKWwp8 AWaLvzQsG1DFHNGZAsm9KudCyPCP6iznki4qZn37kUbyyAV7rfQas5J3LqwgHm2h4UAr QeOR2BA3WPt6DzDpy9o+Fgv4bIe5EWQS8cLo9mJ43x6/5siIXko5KnHGbhbYh1EzBXS7 ZBqutO+AWgTfToK8ylid43Vyg9vWewcK8dFSkws40e5hBGCf2PMSAuN8fRAqx+B8WEZ1 Spog== X-Gm-Message-State: AOJu0Yz7hKorEjjnRdUFu6/YJGqDq1ywi4btRX07oBEGJ15iItMfV6MB pX9sDvWXcrI10D39W2Iu82W+qB5bV8xjMHKeqIhOBg== X-Google-Smtp-Source: AGHT+IH8UeOZgWyG9D92H3NXWPbGPGC4yY5O5mn1wrhmLy0ux3aNjUKwdbQeE6GTn/rfXu8fsN0K84etjofDgE7gm5s= X-Received: by 2002:a17:906:18a1:b0:9a1:c659:7c56 with SMTP id c1-20020a17090618a100b009a1c6597c56mr22487779ejf.22.1697182513262; Fri, 13 Oct 2023 00:35:13 -0700 (PDT) MIME-Version: 1.0 References: <20230921095916.344076-1-juraj.linkes@pantheon.tech> <20231009095325.86444-1-juraj.linkes@pantheon.tech> <86c226a6-d187-4f72-aa5c-7dc1c06e7586@arm.com> In-Reply-To: <86c226a6-d187-4f72-aa5c-7dc1c06e7586@arm.com> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Fri, 13 Oct 2023 09:35:02 +0200 Message-ID: Subject: Re: [PATCH v2] config/arm: update aarch32 build with gcc13 To: Paul Szczepanek Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, bruce.richardson@intel.com, Ruifeng.Wang@arm.com, nd@arm.com, 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 On Thu, Oct 12, 2023 at 2:40=E2=80=AFPM Paul Szczepanek wrote: > > > On 09/10/2023 10:53, Juraj Linke=C5=A1 wrote: > > The aarch32 with gcc13 fails with: > > > > Compiler for C supports arguments -march=3Darmv8-a: NO > > > > ../config/arm/meson.build:714:12: ERROR: Problem encountered: No > > suitable armv8 march version found. > > > > This is because we test -march=3Darmv8-a alone (without the -mpfu optio= n), > > which is no longer supported in gcc13 aarch32 builds. > > > > The most recent recommendation from the compiler team is to build with > > -march=3Darmv8-a+simd -mfpu=3Dauto, which should work for compilers old= and > > new. The suggestion is to first check -march=3Darmv8-a+simd and only th= en > > check -mfpu=3Dauto. > > > > To address this, add a way to force the architecture (the value of > > the -march option). > > > > Signed-off-by: Juraj Linke=C5=A1 > > Acked-by: Ruifeng Wang > > --- > > config/arm/meson.build | 12 +++++++++--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/config/arm/meson.build b/config/arm/meson.build > > index 3f22d8a2fc..5303d0e969 100644 > > --- a/config/arm/meson.build > > +++ b/config/arm/meson.build > > @@ -43,7 +43,9 @@ implementer_generic =3D { > > }, > > 'generic_aarch32': { > > 'march': 'armv8-a', > > - 'compiler_options': ['-mfpu=3Dneon'], > > + 'force_march': true, > > + 'march_features': ['simd'], > > + 'compiler_options': ['-mfpu=3Dauto'], > > 'flags': [ > > ['RTE_ARCH_ARM_NEON_MEMCPY', false], > > ['RTE_ARCH_STRICT_ALIGN', true], > > @@ -711,7 +713,11 @@ if update_flags > > endif > > endforeach > > if candidate_march =3D=3D '' > > - error('No suitable armv8 march version found.') > > + if part_number_config.get('force_march', false) > > + candidate_march =3D part_number_config['march'] > > + else > > + error('No suitable armv8 march version found.') > > + endif > This section is only used when no candidate is found, this would make it > not really be a forced arch but more a fallback arch. If we want the > user to be able to really force the march string we'd need to put the > "is forced?" check higher. Am I reading the code right? Yes, you are right. The name should be a bit different to really reflect th= is. The question now is what logic do we want. Either this "fallback after fallback" when the regular fallback doesn't work OR a real forced march where the regular fallback won't be used at all. > > endif > > if candidate_march !=3D part_number_config['march'] > > warning('Configuration march version is ' + > > @@ -741,7 +747,7 @@ if update_flags > > # apply supported compiler options > > if part_number_config.has_key('compiler_options') > > foreach flag: part_number_config['compiler_options'] > > - if cc.has_argument(flag) > > + if cc.has_multi_arguments(machine_args + [flag]) > > machine_args +=3D flag > > else > > warning('Configuration compiler option ' +