DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nick Connolly <nick.connolly@mayadata.io>
Cc: dev@dpdk.org, bruce.richardson@intel.com,
	Nick Connolly <nick.connolly@mayadata.io>,
	Ranjit Menon <ranjit.menon@intel.com>
Subject: [dpdk-dev] [PATCH v2] windows: minor build fixes
Date: Sat, 31 Oct 2020 06:44:55 +0000
Message-ID: <20201031064455.991-1-nick.connolly@mayadata.io> (raw)
In-Reply-To: <20201030174617.1958-1-nick.connolly@mayadata.io>

Meson versions >= 0.54.0 include support for handling /implib
with msvc link. Specifying it explicitly causes failures when
linking against the dll. Tested using Link 14.27.29112.0 and
Clang 11.0.0.

There were a number of changes to the way that import libraries
are handled between 0.47.1 and 0.54.0. Only make the change
for >= 0.54.0, leaving the behaviour unchanged for earlier
versions.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Tested-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
v2:
* split out config/meson.build change

 drivers/meson.build | 6 ++++--
 lib/meson.build     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index 4bb7e9218..6b50f7238 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -186,8 +186,10 @@ foreach subpath:subdirs
 			lk_deps = [version_map, def_file, mingw_map]
 			if is_windows
 				if is_ms_linker
-					lk_args = ['-Wl,/def:' + def_file.full_path(),
-						'-Wl,/implib:drivers\\' + implib]
+					lk_args = ['-Wl,/def:' + def_file.full_path()]
+					if meson.version().version_compare('<0.54.0')
+						lk_args += ['-Wl,/implib:drivers\\' + implib]
+					endif
 				else
 					lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
 				endif
diff --git a/lib/meson.build b/lib/meson.build
index 1bb019720..ed00f8914 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -157,8 +157,10 @@ foreach l:libraries
 				output: '@0@_mingw.map'.format(libname))
 
 			if is_ms_linker
-				lk_args = ['-Wl,/def:' + def_file.full_path(),
-					'-Wl,/implib:lib\\' + implib]
+				lk_args = ['-Wl,/def:' + def_file.full_path()]
+				if meson.version().version_compare('<0.54.0')
+					lk_args += ['-Wl,/implib:lib\\' + implib]
+				endif
 			else
 				if is_windows
 					lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
-- 
2.25.1


  parent reply	other threads:[~2020-10-31  6:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 17:46 [dpdk-dev] [PATCH] Windows: " Nick Connolly
2020-10-30 17:46 ` [dpdk-dev] [PATCH] windows: " Nick Connolly
2020-10-30 19:57   ` John Alexander
2020-10-30 20:21     ` Nick Connolly
2020-10-30 21:41   ` Ranjit Menon
2020-10-30 22:51     ` Tal Shnaiderman
2020-10-31  6:16       ` Nick Connolly
2020-10-31  6:44 ` Nick Connolly [this message]
2020-11-06 18:51   ` [dpdk-dev] [EXTERNAL] [PATCH v2] " Khoa To
2020-11-13 14:16     ` Thomas Monjalon
2020-10-31  6:39 [dpdk-dev] " Nick Connolly
2020-10-31  6:43 ` Nick Connolly
2020-10-31  7:00   ` Nick Connolly
2020-11-12 21:35     ` Tal Shnaiderman
2020-11-13 14:02       ` Thomas Monjalon
2020-11-15 11:20         ` Tal Shnaiderman

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=20201031064455.991-1-nick.connolly@mayadata.io \
    --to=nick.connolly@mayadata.io \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ranjit.menon@intel.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git