[dpdk-stable] patch 'build: fix linker warnings with clang on Windows' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:53:27 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. 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.

Luca Boccassi

---
>From c2e90f337dc9bdefdc15b76b32c070ce068c25c1 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Date: Thu, 27 Feb 2020 07:25:37 +0300
Subject: [PATCH] build: fix linker warnings with clang on Windows

[ upstream commit 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 ]

Clang on Windows doesn't use pthread for now, while MinGW does. Removing
`-pthread` option with MS linker fixes the following warning:

    clang: warning: argument unused during compilation: '-pthread'
        [-Wunused-command-line-argument]

Option `--no-as-needed` is meaningless for PE output. Disabling it on
Windows fixes the following warning:

    LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored

Fixes: 98edcbb5a ("eal/windows: introduce Windows support")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Tested-by: William Tu <u9012063 at gmail.com>
Tested-by: Pallavi Kadam <pallavi.kadam at intel.com>
Acked-by: Pallavi Kadam <pallavi.kadam at intel.com>
---
 config/meson.build | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 41747012df..cdbe724754 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -98,11 +98,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
 
 dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
 
-add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+if not is_windows
+	add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
+endif
 
-# use pthreads
-add_project_link_arguments('-pthread', language: 'c')
-dpdk_extra_ldflags += '-pthread'
+# use pthreads if available for the platform
+if not is_ms_linker
+	add_project_link_arguments('-pthread', language: 'c')
+	dpdk_extra_ldflags += '-pthread'
+endif
 
 # on some OS, maths functions are in a separate library
 if cc.find_library('m', required : false).found()
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:19.492440217 +0100
+++ 0017-build-fix-linker-warnings-with-clang-on-Windows.patch	2020-05-19 13:56:18.179501099 +0100
@@ -1,8 +1,10 @@
-From 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 Mon Sep 17 00:00:00 2001
+From c2e90f337dc9bdefdc15b76b32c070ce068c25c1 Mon Sep 17 00:00:00 2001
 From: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
 Date: Thu, 27 Feb 2020 07:25:37 +0300
 Subject: [PATCH] build: fix linker warnings with clang on Windows
 
+[ upstream commit 716f9bb42ecb6df640d4dffebe1ec55aaab29ba0 ]
+
 Clang on Windows doesn't use pthread for now, while MinGW does. Removing
 `-pthread` option with MS linker fixes the following warning:
 
@@ -25,10 +27,10 @@
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index 68aeb84703..abedd76f23 100644
+index 41747012df..cdbe724754 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -112,11 +112,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+@@ -98,11 +98,15 @@ dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
  
  dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
  


More information about the stable mailing list