ruby-changes:66667
From: Nobuyoshi <ko1@a...>
Date: Sat, 3 Jul 2021 12:54:27 +0900 (JST)
Subject: [ruby-changes:66667] 6d8422659a (master): Fix linking bundled zlib
https://git.ruby-lang.org/ruby.git/commit/?id=6d8422659a From 6d8422659a4c8a51f37433b6e63cc98d8526abe9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 3 Jul 2021 01:02:46 +0900 Subject: 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 76cd345..13d0ee2 100644 --- a/ext/zlib/extconf.rb +++ b/ext/zlib/extconf.rb @@ -46,7 +46,7 @@ else https://github.com/ruby/ruby/blob/trunk/ext/zlib/extconf.rb#L46 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$(<D) $<') @@ -62,7 +62,7 @@ else https://github.com/ruby/ruby/blob/trunk/ext/zlib/extconf.rb#L62 "$(TARGET_SO): $(ZIMPLIB)\n", "$(ZIMPLIB):\n", "#{zmk} $(ZOPTS) $@\n", - "install-so: $(topdir)/#{dll}", + "install-so static: $(topdir)/#{dll}", "$(topdir)/#{dll}: $(ZIMPLIB)\n", "\t$(Q) $(COPY) #{dll} $(@D)\n", "clean: clean-zsrc\n", -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/