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 2A7E3431FC; Wed, 25 Oct 2023 14:57:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17917402D4; Wed, 25 Oct 2023 14:57:18 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 950EE402D0 for ; Wed, 25 Oct 2023 14:57:16 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-32dbbf3c782so509559f8f.1 for ; Wed, 25 Oct 2023 05:57:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1698238636; x=1698843436; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wZXJJ2TcucleKedbWsUr4ZdkXq0VH+dn7UWgqS0f5F4=; b=fYhzdCq4H5MFv/qW3xM9nWgJriPXwGqtli5P9Pj5CvCngHmmK4ywaFcbQ3GvBT6MzS jhD++zYddeaA1F/GehDD6OSx0NazWbR3oHDKhMUYanW8q6XmvgQfLxgFgT0FcCFOmyJk anfSJ5p21N51+SMJO/HtmTMegJdWsw6dp0Ye5zWpGAkVO8J6tZz5zuyrJY+eTlurDZv0 SN/M8Ycb2v4uTB99TEisFvwepX1nHkMSUvG7g2IC+nxm8NDqVEVOSpMQ8SUkQg7y7WiW 5BT8yWlbXzCepFUOLTPXsjRZSYCyUUhUdkIpyPUw1OZB/iwdcMzGiYkSHmWEJyv3jAHu xSvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698238636; x=1698843436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wZXJJ2TcucleKedbWsUr4ZdkXq0VH+dn7UWgqS0f5F4=; b=nNMR41NvjdYkMEgZ+q4W3+i6vR90F5M/cuV6Q5IUh3nSnG5FS3HCTT5Nx665zrdqa5 UMbFToCrtnsUp1owABQKusYmQxFr9yyZK/QXDRd8QHarAjWht4L2+SKCeE3+Y9y8GP1w LPrDhImWdtsGi62weDzZBTmt0BVPs2kUGW9NESTH+J4WD2K7HMhJAyTjZ+G/cy12Nl9p Zc7RDvVK27jInBTgvnnm52Mn5ulqCBO1WYred+SWDYzAnPhVd07IOZ/xz37z385tAPQF 3XE37FWaCGRr1PT7C2NiKqupnKm9wYbIyXz8TGL7x8C3HcWYWi2McRWcE/PzMCJgrG3Y 1fqA== X-Gm-Message-State: AOJu0YyHz1VlTIpp2Hf9mYrkMYKT9zROJZ6WllF4rYWBT5b+ZfLfBXJB r81zMBcYyVf0tQHjB4L1+tSsfw== X-Google-Smtp-Source: AGHT+IG3mFanl3In2RLMFPQNvHhC8CUgC0FRkk8DVUL/7NMZTCpQA1lIc79vXCc4gQJa0aXAi9X0YQ== X-Received: by 2002:adf:e0c4:0:b0:31f:a717:f1b6 with SMTP id m4-20020adfe0c4000000b0031fa717f1b6mr13743797wri.11.1698238636190; Wed, 25 Oct 2023 05:57:16 -0700 (PDT) Received: from jlinkes-PT-Latitude-5530.. (ip-46.34.247.179.o2inet.sk. [46.34.247.179]) by smtp.gmail.com with ESMTPSA id f1-20020adff8c1000000b0032da75af3easm12005834wrq.80.2023.10.25.05.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:57:15 -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 v3] config/arm: update aarch32 build with gcc13 Date: Wed, 25 Oct 2023 14:57:14 +0200 Message-Id: <20231025125714.132793-1-juraj.linkes@pantheon.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231009095325.86444-1-juraj.linkes@pantheon.tech> References: <20231009095325.86444-1-juraj.linkes@pantheon.tech> 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 alone (without the -mpfu option), which is no longer supported in gcc13 aarch32 builds. The most recent recommendation from the compiler team is to build with -march=armv8-a+simd -mfpu=auto, which should work for compilers old and new. The suggestion is to first check -march=armv8-a+simd and only then check -mfpu=auto. To address this, add a way to force the architecture (the value of the -march option). Signed-off-by: Juraj Linkeš --- config/arm/meson.build | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 3f22d8a2fc..c3f763764a 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], @@ -695,21 +697,25 @@ if update_flags # probe supported archs and their features candidate_march = '' if part_number_config.has_key('march') - supported_marchs = ['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 - if supported_march == part_number_config['march'] - # start checking from this version downwards - check_compiler_support = true - endif - if (check_compiler_support and - cc.has_argument('-march=' + supported_march)) - candidate_march = supported_march - # highest supported march version found - break - endif - endforeach + if part_number_config.get('force_march', false) + candidate_march = part_number_config['march'] + else + supported_marchs = ['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 + if supported_march == part_number_config['march'] + # start checking from this version downwards + check_compiler_support = true + endif + if (check_compiler_support and + cc.has_argument('-march=' + supported_march)) + candidate_march = supported_march + # highest supported march version found + break + endif + endforeach + endif if candidate_march == '' error('No suitable armv8 march version found.') endif @@ -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 += flag else warning('Configuration compiler option ' + -- 2.34.1