DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	stable@dpdk.org, bruce.richardson@intel.com,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: [PATCH 1/3] config/x86: skip GNU binutils bug check for LLVM
Date: Sat, 13 Nov 2021 00:48:24 +0300	[thread overview]
Message-ID: <20211112214826.333853-2-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20211112214826.333853-1-dmitry.kozliuk@gmail.com>

AVX512 was disabled when GNU binutils were missing or had a known bug,
even if LLVM binutils were used for the build,
because binutils-avx512-check.sh was invoked regardless and failed.
In particular, this was the case for FreeBSD with clang (default).
Run the check only when GNU binutils are used.

Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version")
Cc: stable@dpdk.org
Cc: bruce.richardson@intel.com

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 config/x86/meson.build | 7 ++++---
 lib/acl/meson.build    | 2 +-
 lib/fib/meson.build    | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 29f3dea181..603359e55a 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -2,9 +2,10 @@
 # Copyright(c) 2017-2020 Intel Corporation
 
 # get binutils version for the workaround of Bug 97
-if not is_windows
-    binutils_ok = run_command(binutils_avx512_check)
-    if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
+binutils_ok = true
+if not is_windows and (is_linux or cc.get_id() == 'gcc')
+    binutils_ok = run_command(binutils_avx512_check).returncode() == 0
+    if not binutils_ok and cc.has_argument('-mno-avx512f')
         machine_args += '-mno-avx512f'
         warning('Binutils error with AVX512 assembly, disabling AVX512 support')
     endif
diff --git a/lib/acl/meson.build b/lib/acl/meson.build
index f3dc513846..fbe17f9454 100644
--- a/lib/acl/meson.build
+++ b/lib/acl/meson.build
@@ -36,7 +36,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
     # compile AVX512 version if:
     # we are building 64-bit binary AND binutils can generate proper code
 
-    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
+    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
 
         # compile AVX512 version if either:
         # a. we have AVX512 supported in minimum instruction set
diff --git a/lib/fib/meson.build b/lib/fib/meson.build
index 593c8c47c8..9b848d0841 100644
--- a/lib/fib/meson.build
+++ b/lib/fib/meson.build
@@ -14,7 +14,7 @@ deps += ['rib']
 
 # compile AVX512 version if:
 # we are building 64-bit binary AND binutils can generate proper code
-if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
+if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
     # compile AVX512 version if either:
     # a. we have AVX512F supported in minimum instruction set baseline
     # b. it's not minimum instruction set, but supported by compiler
-- 
2.29.3


  reply	other threads:[~2021-11-12 21:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 21:48 [PATCH 0/3] config/x86: improve AVX512 availability check Dmitry Kozlyuk
2021-11-12 21:48 ` Dmitry Kozlyuk [this message]
2021-11-15  9:17   ` [PATCH 1/3] config/x86: skip GNU binutils bug check for LLVM Bruce Richardson
2021-11-12 21:48 ` [PATCH 2/3] buildtools: make AVX512 check script portable Dmitry Kozlyuk
2021-11-15  9:28   ` Bruce Richardson
2021-11-12 21:48 ` [PATCH 3/3] config/x86: fix MinGW cross build with meson 0.49 Dmitry Kozlyuk
2021-11-15  9:30   ` Bruce Richardson
2021-11-17  8:42 ` [PATCH 0/3] config/x86: improve AVX512 availability check Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211112214826.333853-2-dmitry.kozliuk@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).