Skip to content

Commit

Permalink
Bug ruby#6462: EXTSOLIBS
Browse files Browse the repository at this point in the history
* Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
* ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
  of discard libraries needed by default.  [Bug ruby#6462]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 20, 2012
1 parent 9373d91 commit a906a9d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
Sun May 20 12:25:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>

* Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.

* ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
of discard libraries needed by default. [Bug #6462]

Sat May 19 19:04:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> Sat May 19 19:04:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>


* ext/extmk.rb (command_output): ENCOBJS is needed for all linked * ext/extmk.rb (command_output): ENCOBJS is needed for all linked
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -199,7 +199,7 @@ $(LIBRUBY_A):
$(LIBRUBY_SO): $(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE) @-$(PRE_LIBRUBY_UPDATE)
$(ECHO) linking shared-library $@ $(ECHO) linking shared-library $@
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(OUTFLAG)$@ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@ -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \ @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \ File.symlink "$(LIBRUBY_SO)", link}' \
Expand Down
1 change: 1 addition & 0 deletions common.mk
Expand Up @@ -34,6 +34,7 @@ NORMALMAINOBJ = main.$(OBJEXT)
MAINOBJ = $(NORMALMAINOBJ) MAINOBJ = $(NORMALMAINOBJ)
EXTOBJS = EXTOBJS =
DLDOBJS = $(DMYEXT) DLDOBJS = $(DMYEXT)
EXTSOLIBS =
MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) dmyversion.$(OBJEXT) miniprelude.$(OBJEXT) MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) dmyversion.$(OBJEXT) miniprelude.$(OBJEXT)
ENC_MK = enc.mk ENC_MK = enc.mk


Expand Down
2 changes: 1 addition & 1 deletion ext/extmk.rb
Expand Up @@ -663,7 +663,7 @@ def mf.macro(name, values, max = 70)
mf.print "#{tgt}:\n\t$(Q)$(MAKE) " mf.print "#{tgt}:\n\t$(Q)$(MAKE) "
mf.print "$(MFLAGS) " mf.print "$(MFLAGS) "
if enable_config("shared", $enable_shared) if enable_config("shared", $enable_shared)
mf.print %[DLDOBJS="$(EXTOBJS)" SOLIBS="$(ENCOBJS) $(EXTLIBS)" ] mf.print %[DLDOBJS="$(EXTOBJS)" EXTSOLIBS="$(ENCOBJS) $(EXTLIBS)" ]
mf.print 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS) ' mf.print 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS) '
else else
mf.print %[EXTOBJS="$(EXTOBJS) $(ENCOBJS)" EXTLIBS="$(EXTLIBS)" ] mf.print %[EXTOBJS="$(EXTOBJS) $(ENCOBJS)" EXTLIBS="$(EXTLIBS)" ]
Expand Down
3 changes: 3 additions & 0 deletions win32/Makefile.sub
Expand Up @@ -222,6 +222,9 @@ RFLAGS = -r
!if !defined(EXTLIBS) !if !defined(EXTLIBS)
EXTLIBS = EXTLIBS =
!endif !endif
!if !defined(EXTSOLIBS)
EXTSOLIBS =
!endif
!if !defined(LIBS) !if !defined(LIBS)
LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib imagehlp.lib $(EXTLIBS) LIBS = oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib imagehlp.lib $(EXTLIBS)
!endif !endif
Expand Down

0 comments on commit a906a9d

Please sign in to comment.