1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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.
This commit is contained in:
Nobuyoshi Nakada 2021-07-03 01:02:46 +09:00
parent 287fb680e2
commit 6d8422659a
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -46,7 +46,7 @@ else
end end
m = File.read(m) m = File.read(m)
zimplib = m[/^IMPLIB[ \t]*=[ \t]*(\S+)/, 1] zimplib = m[/^IMPLIB[ \t]*=[ \t]*(\S+)/, 1]
$LOCAL_LIBS << " " << zimplib ($LOCAL_LIBS << " ./" << zimplib).strip!
unless $nmake or /^TOP[ \t]/ =~ m unless $nmake or /^TOP[ \t]/ =~ m
m.gsub!(/win32\/zlib\.def/, '$(TOP)/\&') m.gsub!(/win32\/zlib\.def/, '$(TOP)/\&')
m.gsub!(/^(\t.*[ \t])(\S+\.rc)/, '\1-I$(<D) $<') m.gsub!(/^(\t.*[ \t])(\S+\.rc)/, '\1-I$(<D) $<')
@ -62,7 +62,7 @@ else
"$(TARGET_SO): $(ZIMPLIB)\n", "$(TARGET_SO): $(ZIMPLIB)\n",
"$(ZIMPLIB):\n", "$(ZIMPLIB):\n",
"#{zmk} $(ZOPTS) $@\n", "#{zmk} $(ZOPTS) $@\n",
"install-so: $(topdir)/#{dll}", "install-so static: $(topdir)/#{dll}",
"$(topdir)/#{dll}: $(ZIMPLIB)\n", "$(topdir)/#{dll}: $(ZIMPLIB)\n",
"\t$(Q) $(COPY) #{dll} $(@D)\n", "\t$(Q) $(COPY) #{dll} $(@D)\n",
"clean: clean-zsrc\n", "clean: clean-zsrc\n",