DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] windows: minor build fixes
@ 2020-10-31  6:39 Nick Connolly
  2020-10-31  6:43 ` Nick Connolly
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Connolly @ 2020-10-31  6:39 UTC (permalink / raw)
  Cc: dev, bruce.richardson, Nick Connolly, Ranjit Menon

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


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH] Windows: minor build fixes
@ 2020-10-30 17:46 Nick Connolly
  2020-10-31  6:44 ` [dpdk-dev] [PATCH v2] windows: " Nick Connolly
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Connolly @ 2020-10-30 17:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Nick Connolly

Don't run symlink-drivers-solibs.sh as part of 'install' because
Windows doesn't support shell scripts, causing the install to
fail.

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.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
---
 config/meson.build  | 8 +++++---
 drivers/meson.build | 6 ++++--
 lib/meson.build     | 6 ++++--
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 258b01d06..a29693b88 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -57,9 +57,11 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 # driver .so files often depend upon the bus drivers for their connect bus,
 # e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
 # to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
-		get_option('libdir'),
-		pmd_subdir_opt)
+if not is_windows
+	meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+			get_option('libdir'),
+			pmd_subdir_opt)
+endif
 
 # set the machine type and cflags for it
 if meson.is_cross_build()
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-15 11:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31  6:39 [dpdk-dev] [PATCH v2] windows: minor build fixes 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
  -- strict thread matches above, loose matches on Subject: below --
2020-10-30 17:46 [dpdk-dev] [PATCH] Windows: " Nick Connolly
2020-10-31  6:44 ` [dpdk-dev] [PATCH v2] windows: " Nick Connolly

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).