From 6d8422659a4c8a51f37433b6e63cc98d8526abe9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 3 Jul 2021 01:02:46 +0900 Subject: [PATCH] Fix linking bundled zlib * Prefix "./" to the import library name to expanded when static linking exts. * Copy zlib shared library to the top build directory. --- ext/zlib/extconf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb index 76cd34582e..13d0ee2052 100644 --- a/ext/zlib/extconf.rb +++ b/ext/zlib/extconf.rb @@ -46,7 +46,7 @@ else end m = File.read(m) zimplib = m[/^IMPLIB[ \t]*=[ \t]*(\S+)/, 1] - $LOCAL_LIBS << " " << zimplib + ($LOCAL_LIBS << " ./" << zimplib).strip! unless $nmake or /^TOP[ \t]/ =~ m m.gsub!(/win32\/zlib\.def/, '$(TOP)/\&') m.gsub!(/^(\t.*[ \t])(\S+\.rc)/, '\1-I$(