DPDK patches and discussions
 help / color / mirror / Atom feed
From: William Tu <u9012063@gmail.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, dmitry.kozliuk@gmail.com
Subject: [dpdk-dev] [PATCH v1] build/pkg-config: Fix warning for Windows
Date: Fri, 24 Sep 2021 18:08:16 +0000	[thread overview]
Message-ID: <20210924180816.150-1-u9012063@gmail.com> (raw)

Windows does not support linker option '/-no-whole-archive'
or '/whole-archive'. The patch removes them under Windows build.

Signed-off-by: William Tu <u9012063@gmail.com>
---
 buildtools/pkg-config/meson.build | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 0412883c8f..989033db89 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -40,7 +40,13 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
 platform_flags = []
 if not is_windows
     platform_flags += ['-Wl,--export-dynamic'] # ELF only
+    libraries_args = ['-Wl,--whole-archive'] +
+                     dpdk_drivers + dpdk_static_libraries +
+                     ['-Wl,--no-whole-archive'] + platform_flags
+else
+     libraries_args = dpdk_drivers + dpdk_static_libraries
 endif
+
 pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
         filebase: 'libdpdk',
         version: meson.project_version(),
@@ -49,9 +55,7 @@ Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
         requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs
                       # if libbsd is not enabled, then this is blank
-        libraries_private: ['-Wl,--whole-archive'] +
-            dpdk_drivers + dpdk_static_libraries +
-            ['-Wl,--no-whole-archive'] + platform_flags
+        libraries_private: libraries_args
 )
 
 # For static linking with dependencies as shared libraries,
-- 
2.33.0.windows.2


             reply	other threads:[~2021-09-24 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 18:08 William Tu [this message]
2021-09-25 16:22 ` Dmitry Kozlyuk
2021-09-26  3:22   ` William Tu
2021-10-07 11:58     ` Thomas Monjalon
2021-10-07 12:04       ` William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210924180816.150-1-u9012063@gmail.com \
    --to=u9012063@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).