ruby-changes:67359
From: Nobuyoshi <ko1@a...>
Date: Mon, 30 Aug 2021 12:04:45 +0900 (JST)
Subject: [ruby-changes:67359] be9cc6c758 (master): Fix rubyspec_capiext dependency and flags
https://git.ruby-lang.org/ruby.git/commit/?id=be9cc6c758 From be9cc6c75865b24652d001f0f34f2e63180418c6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 30 Aug 2021 12:03:44 +0900 Subject: Fix rubyspec_capiext dependency and flags - The file needed to link may be the import library. - Remove duplicate flags. --- defs/gmake.mk | 4 ++-- spec/ruby/optional/capi/spec_helper.rb | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/defs/gmake.mk b/defs/gmake.mk index 86c7396..e533396 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -404,10 +404,10 @@ update-deps: https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L404 # order-only-prerequisites doesn't work for $(RUBYSPEC_CAPIEXT) # because the same named directory exists in the source tree. -$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY_SO) +$(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY) $(ECHO) building $@ $(Q) $(MAKEDIRS) $(@D) - $(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(ARCH_FLAG) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBY_SO) + $(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(LDFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBYARG) $(Q) $(RMALL) $@.* rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c))) diff --git a/spec/ruby/optional/capi/spec_helper.rb b/spec/ruby/optional/capi/spec_helper.rb index 2c36ead..9bd2d97 100644 --- a/spec/ruby/optional/capi/spec_helper.rb +++ b/spec/ruby/optional/capi/spec_helper.rb @@ -32,9 +32,8 @@ def compile_extension(name) https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/spec_helper.rb#L32 ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h" if RbConfig::CONFIG["ENABLE_SHARED"] == "yes" - libdirname = RbConfig::CONFIG['LIBPATHENV'] == 'PATH' ? 'bindir' : - RbConfig::CONFIG['libdirname'] # defined since 2.1 - libruby_so = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY_SO']}" + libdirname = RbConfig::CONFIG['libdirname'] # defined since 2.1 + libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}" end begin @@ -46,7 +45,7 @@ def compile_extension(name) https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/spec_helper.rb#L45 when mtime <= File.mtime("#{core_ext_dir}/rubyspec.h") when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c") when mtime <= File.mtime(ruby_header) - when libruby_so && mtime <= File.mtime(libruby_so) + when libruby && mtime <= File.mtime(libruby) else return lib # up-to-date end -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/