From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id A6ADA1B51F for ; Thu, 7 Feb 2019 14:27:37 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E001646753; Thu, 7 Feb 2019 13:27:36 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.33.36.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD739848F7; Thu, 7 Feb 2019 13:27:35 +0000 (UTC) From: Kevin Traynor To: Harry van Haaren Cc: Ferruh Yigit , dpdk stable Date: Thu, 7 Feb 2019 13:25:24 +0000 Message-Id: <20190207132614.20538-18-ktraynor@redhat.com> In-Reply-To: <20190207132614.20538-1-ktraynor@redhat.com> References: <20190207132614.20538-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 07 Feb 2019 13:27:37 +0000 (UTC) Subject: [dpdk-stable] patch 'build: fix meson check for binutils 2.30' has been queued to LTS release 18.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2019 13:27:38 -0000 Hi, FYI, your patch has been queued to LTS release 18.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/19. 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. Thanks. Kevin Traynor --- >>From b5d310d08c11fc7f55142fdaaec93dbdd33e3f2d Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Thu, 17 Jan 2019 17:17:44 +0000 Subject: [PATCH] build: fix meson check for binutils 2.30 [ upstream commit 566b4d7a968fa454ff7deab7c43216712878af30 ] This commit reworks the checks for binutils 2.30 and how the flags to disable AVX512F are passed to the compiler. Previously the #define for including AVX512 code was set, while the -mno-avx512f argument was given to the compiler. This would cause gcc to correctly refuse to emit AVX512 instructions, but the rte_memcpy code that includes AVX512 optimizations was being added to the build. The check for binutils check is now moved to x86 as it is irrelevant for other architectures, and the -mno-avx512f flag is passed to a march_opts array in meson. As the -mno-avx512 flag is added earlier in the build, the code in rte_memcpy is no longer attempted to be compiled. This commit also adds a message print in the meson configure stage to alert the user of the workaround being employed. Fixes: a32ca9a4ebc1 ("mk: fix scope of disabling AVX512F support") Signed-off-by: Harry van Haaren Tested-by: Ferruh Yigit --- config/meson.build | 8 -------- config/x86/meson.build | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/config/meson.build b/config/meson.build index 40802fc88..db32499b3 100644 --- a/config/meson.build +++ b/config/meson.build @@ -44,12 +44,4 @@ dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1) -# get binutils version for the workaround of Bug 97 -ldver = run_command('ld', '-v').stdout().strip() -if ldver.contains('2.30') - if cc.has_argument('-mno-avx512f') - machine_args += '-mno-avx512f' - endif -endif - add_project_link_arguments('-Wl,--no-as-needed', language: 'c') dpdk_extra_ldflags += '-Wl,--no-as-needed' diff --git a/config/x86/meson.build b/config/x86/meson.build index 33efb5e54..9e5952aa3 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -3,5 +3,14 @@ # for checking defines we need to use the correct compiler flags -march_opt = '-march=@0@'.format(machine) +march_opt = ['-march=@0@'.format(machine)] + +# get binutils version for the workaround of Bug 97 +ldver = run_command('ld', '-v').stdout().strip() +if ldver.contains('2.30') + if cc.has_argument('-mno-avx512f') + march_opt += '-mno-avx512f' + message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') + endif +endif # we require SSE4.2 for DPDK -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-02-07 13:19:55.944295528 +0000 +++ 0018-build-fix-meson-check-for-binutils-2.30.patch 2019-02-07 13:19:55.000000000 +0000 @@ -1,8 +1,10 @@ -From 566b4d7a968fa454ff7deab7c43216712878af30 Mon Sep 17 00:00:00 2001 +From b5d310d08c11fc7f55142fdaaec93dbdd33e3f2d Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Thu, 17 Jan 2019 17:17:44 +0000 Subject: [PATCH] build: fix meson check for binutils 2.30 +[ upstream commit 566b4d7a968fa454ff7deab7c43216712878af30 ] + This commit reworks the checks for binutils 2.30 and how the flags to disable AVX512F are passed to the compiler.