[PATCH] buildtools: fix avx512 check for Python 3.5

Lance Richardson lance.richardson at broadcom.com
Mon Jan 3 18:09:40 CET 2022


Python 3.5 subprocess.run() does not have a capture_output
parameter (it is present only in 3.7 and up). Capture output
by using subprocess.PIPE for stdout instead.

Fixes: bb9cd91095b3 ("buildtools: make AVX512 check portable")
Cc: stable at dpdk.org
Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
---
 buildtools/binutils-avx512-check.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/binutils-avx512-check.py b/buildtools/binutils-avx512-check.py
index a4e14f3593..9d7d360d95 100644
--- a/buildtools/binutils-avx512-check.py
+++ b/buildtools/binutils-avx512-check.py
@@ -15,7 +15,7 @@
     src = '__asm__("vpgatherqq {}");'.format(gather_params).encode('utf-8')
     subprocess.run(cc + ['-c', '-xc', '-o', obj.name, '-'], input=src, check=True)
     asm = subprocess.run([objdump, '-d', '--no-show-raw-insn', obj.name],
-                         capture_output=True, check=True).stdout.decode('utf-8')
+                         stdout=subprocess.PIPE, check=True).stdout.decode('utf-8')
     if gather_params not in asm:
 	    print('vpgatherqq displacement error with as')
 	    sys.exit(1)
-- 
2.25.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4221 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mails.dpdk.org/archives/stable/attachments/20220103/e5dc4134/attachment.bin>


More information about the stable mailing list