]> git.droids-corp.org - dpdk.git/commitdiff
config/x86: skip GNU binutils bug check for LLVM
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Fri, 12 Nov 2021 21:48:24 +0000 (00:48 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Nov 2021 08:41:13 +0000 (09:41 +0100)
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
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
config/x86/meson.build
lib/acl/meson.build
lib/fib/meson.build

index 29f3dea1813c09b2e20f07ef9105a14b206d7fa2..603359e55a6c52307dd509e1753cd7022c1d0161 100644 (file)
@@ -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
index f3dc513846f978056378b5022c377b91ff0455e0..fbe17f9454cacac65689304229e47cb3001c6ed2 100644 (file)
@@ -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
index 593c8c47c8e3cafd1e0db1c8c9525e4e1a4beb1b..9b848d08417c3e0f036c8087969c5cb3d8dc21c8 100644 (file)
@@ -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