patch 'config/x86: skip GNU binutils bug check for LLVM' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Sun Nov 28 15:53:43 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Date: Sat, 13 Nov 2021 00:48:24 +0300
Subject: [PATCH] config/x86: skip GNU binutils bug check for LLVM
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 04f9fac660d018d0b163dcafed2805909f576ee9 ]

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")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 config/x86/meson.build     | 7 ++++---
 lib/librte_acl/meson.build | 2 +-
 lib/librte_fib/meson.build | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/config/x86/meson.build b/config/x86/meson.build
index 31bfa63b1c..0007b6b49f 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/librte_acl/meson.build b/lib/librte_acl/meson.build
index ee4e229e59..c261101de7 100644
--- a/lib/librte_acl/meson.build
+++ b/lib/librte_acl/meson.build
@@ -30,7 +30,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/librte_fib/meson.build b/lib/librte_fib/meson.build
index 18eadcc56c..2438a2791c 100644
--- a/lib/librte_fib/meson.build
+++ b/lib/librte_fib/meson.build
@@ -8,7 +8,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.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-28 22:41:05.402977689 +0800
+++ 0039-config-x86-skip-GNU-binutils-bug-check-for-LLVM.patch	2021-11-28 22:41:03.323540920 +0800
@@ -1 +1 @@
-From 04f9fac660d018d0b163dcafed2805909f576ee9 Mon Sep 17 00:00:00 2001
+From 27cfa20c2a997f4b49d5fd2a2531d8a0fc1cb72d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 04f9fac660d018d0b163dcafed2805909f576ee9 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -18,3 +20,3 @@
- config/x86/meson.build | 7 ++++---
- lib/acl/meson.build    | 2 +-
- lib/fib/meson.build    | 2 +-
+ config/x86/meson.build     | 7 ++++---
+ lib/librte_acl/meson.build | 2 +-
+ lib/librte_fib/meson.build | 2 +-
@@ -24 +26 @@
-index 29f3dea181..603359e55a 100644
+index 31bfa63b1c..0007b6b49f 100644
@@ -32,2 +34,2 @@
--    binutils_ok = run_command(binutils_avx512_check)
--    if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
+-	binutils_ok = run_command(binutils_avx512_check)
+-	if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
@@ -36,12 +38,12 @@
-+    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
++	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/librte_acl/meson.build b/lib/librte_acl/meson.build
+index ee4e229e59..c261101de7 100644
+--- a/lib/librte_acl/meson.build
++++ b/lib/librte_acl/meson.build
+@@ -30,7 +30,7 @@ if dpdk_conf.has('RTE_ARCH_X86')
+ 	# compile AVX512 version if:
+ 	# we are building 64-bit binary AND binutils can generate proper code
@@ -49,2 +51,2 @@
--    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
-+    if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
+-	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0
++	if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok
@@ -52,7 +54,7 @@
-         # 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 either:
+ 		# a. we have AVX512 supported in minimum instruction set
+diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build
+index 18eadcc56c..2438a2791c 100644
+--- a/lib/librte_fib/meson.build
++++ b/lib/librte_fib/meson.build
+@@ -8,7 +8,7 @@ deps += ['rib']
@@ -64,3 +66,3 @@
-     # 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
+ 	# 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


More information about the stable mailing list