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 E8D2F425F3; Thu, 21 Sep 2023 11:59:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A08E2402EF; Thu, 21 Sep 2023 11:59:21 +0200 (CEST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mails.dpdk.org (Postfix) with ESMTP id 2C39C402B5 for ; Thu, 21 Sep 2023 11:59:20 +0200 (CEST) Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-9a65f9147ccso84247766b.1 for ; Thu, 21 Sep 2023 02:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1695290360; x=1695895160; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=djD9XL/0WIiQF+rfvvS2NWwIViG+PVpwl46KBaXDHnc=; b=Iy0bQ0k4aQY3CfolUFHp3dG8snpN1xpR+9uHw6G1rQJu7EHYPI7oqKxMspDAdB23Qd H1GYJa9nHxoaItXRg+DOWbcth9fYFFbcvvTNI1zH7MgLsPX3jWizQHgXYfBYWJTVzb99 nfuufuBL2vd9TCbUN9yR5M2gUgB4N4OpGSSCVUK8DlxWjiGMVgqzBi60SYrAmk8Ogggp 3wjs2/3HpooNDjibHyPxfm4O15KpeMsR1EanVAVfR863mKQLx8MRNrrneRzQRiErrn0F dsH+Se8OvAwJDiHNUWXJLK7B72BjiWAd1DxTEaVXHhy/M7Qi0DTMNSeERPSrTAXGA7sQ IOaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695290360; x=1695895160; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=djD9XL/0WIiQF+rfvvS2NWwIViG+PVpwl46KBaXDHnc=; b=UAGWHgXY8gRo/1BwZZ2TV8tUQNKRCRWzCL09JGZCw6VGj+hxs+zK3GcjHQ+oAoPd5C uOYwzGGxzTVrXPCZgnocAN/oG6RdOIqDUfIT2yK+VfsnNG05vvT5HpCozKTXtE1rgc2g eikjN/hDso1uiyw9iKzJRhElWjsgH8kHldTuC26EhGF7t3vP+eqj5GQFZB11sIQJU5gj 60V+IeYgGUB3ej8quJXXsFdhS4vIv7hbgt+9cemSIRuoC4WpXLzwvpmTAO9ZLn3my9Hf OSF7fx/siCrmckPFoZNPO8w02ZVGN2KBnndjprf5/VmUtqne1kjIIJ+uzMxjcNsbYRot LvtQ== X-Gm-Message-State: AOJu0YxuihOHy26OVz84W5kIDsd40q2BWjsBPJv41QxCR+ut6Ahj2UJE du3KqxU8Br8q5avJXiyyIey9OQ== X-Google-Smtp-Source: AGHT+IGYH2LOD8O9MamUduWIFSsaYSyU13iNwD49HxjEVqmbKvIfErjk26Q+BTBxrjgyoJGH47CwyA== X-Received: by 2002:a17:906:8450:b0:9ae:3f7a:f777 with SMTP id e16-20020a170906845000b009ae3f7af777mr4386359ejy.9.1695290359490; Thu, 21 Sep 2023 02:59:19 -0700 (PDT) Received: from jlinkes-PT-Latitude-5530.. (ip-46.34.247.5.o2inet.sk. [46.34.247.5]) by smtp.gmail.com with ESMTPSA id a19-20020a170906275300b0099290e2c163sm774612ejd.204.2023.09.21.02.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 02:59:19 -0700 (PDT) From: =?UTF-8?q?Juraj=20Linke=C5=A1?= To: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, bruce.richardson@intel.com, Ruifeng.Wang@arm.com Cc: dev@dpdk.org, =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH v1] config/arm: update aarch32 build with gcc13 Date: Thu, 21 Sep 2023 11:59:16 +0200 Message-Id: <20230921095916.344076-1-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 The aarch32 with gcc13 fails with: Compiler for C supports arguments -march=armv8-a: NO ../config/arm/meson.build:714:12: ERROR: Problem encountered: No suitable armv8 march version found. This is because we test -march=armv8-a without the -mpfu option, which is required for aarch32 build with gcc13. On top of that, the most recent recommendation from the compiler team to build with -march=armv8-a+simd -mfpu=auto. We can address this by first testing compiler options and only test the march after that (coupled with supported options). This doesn't fully work though, as just -march=armv8 in not enough to be accepted with -mfpu=auto. To address this other issue, add the force_march parameter to part number config which will force the configured march to be used, even if the compiler doesn't support the particular combination of march and other compiler options, such as mfpu. This then allows the check to proceed to the -march=armv8-a+simd -mfpu=auto, which is valid. Signed-off-by: Juraj Linkeš --- config/arm/meson.build | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 3f22d8a2fc..0b42d74876 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -43,7 +43,9 @@ implementer_generic = { }, 'generic_aarch32': { 'march': 'armv8-a', - 'compiler_options': ['-mfpu=neon'], + 'force_march': true, + 'march_features': ['simd'], + 'compiler_options': ['-mfpu=auto'], 'flags': [ ['RTE_ARCH_ARM_NEON_MEMCPY', false], ['RTE_ARCH_STRICT_ALIGN', true], @@ -692,6 +694,19 @@ if update_flags machine_args = [] # Clear previous machine args + # test supported compiler options + compiler_options = [] + if part_number_config.has_key('compiler_options') + foreach flag: part_number_config['compiler_options'] + if cc.has_argument(flag) + compiler_options += flag + else + warning('Configuration compiler option ' + + '@0@ isn\'t supported.'.format(flag)) + endif + endforeach + endif + # probe supported archs and their features candidate_march = '' if part_number_config.has_key('march') @@ -704,14 +719,18 @@ if update_flags check_compiler_support = true endif if (check_compiler_support and - cc.has_argument('-march=' + supported_march)) + cc.has_multi_arguments('-march=' + supported_march, compiler_options)) candidate_march = supported_march # highest supported march version found break endif endforeach if candidate_march == '' - error('No suitable armv8 march version found.') + if part_number_config.get('force_march', false) + candidate_march = part_number_config['march'] + else + error('No suitable armv8 march version found.') + endif endif if candidate_march != part_number_config['march'] warning('Configuration march version is ' + @@ -728,27 +747,16 @@ if update_flags march_features += soc_config['extra_march_features'] endif foreach feature: march_features - if cc.has_argument('+'.join([candidate_march, feature])) + if cc.has_multi_arguments('+'.join([candidate_march, feature]), compiler_options) candidate_march = '+'.join([candidate_march, feature]) else warning('The compiler does not support feature @0@' .format(feature)) endif endforeach - machine_args += candidate_march endif - # apply supported compiler options - if part_number_config.has_key('compiler_options') - foreach flag: part_number_config['compiler_options'] - if cc.has_argument(flag) - machine_args += flag - else - warning('Configuration compiler option ' + - '@0@ isn\'t supported.'.format(flag)) - endif - endforeach - endif + machine_args += [candidate_march] + compiler_options # apply flags foreach flag: dpdk_flags -- 2.34.1