[前][次][番号順一覧][スレッド一覧]

ruby-changes:43360

From: nobu <ko1@a...>
Date: Sat, 18 Jun 2016 10:13:43 +0900 (JST)
Subject: [ruby-changes:43360] nobu:r55434 (trunk): Fix static-linked-ext encodings

nobu	2016-06-18 10:13:39 +0900 (Sat, 18 Jun 2016)

  New Revision: 55434

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55434

  Log:
    Fix static-linked-ext encodings
    
    * common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
      different than ENCOBJS, to get rid of circular dependency.
      build libencs when linking encodings statically.
      [ruby-core:75618] [Bug #12401]

  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/ext/extmk.rb
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 55433)
+++ ext/extmk.rb	(revision 55434)
@@ -703,12 +703,12 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L703
     mf.macro "EXTLDFLAGS", $extflags.split
     submakeopts = []
     if enable_config("shared", $enable_shared)
-      submakeopts << 'DLDOBJS="$(EXTOBJS) $(ENCOBJS)"'
+      submakeopts << 'DLDOBJS="$(EXTOBJS) $(EXTENCS)"'
       submakeopts << 'EXTOBJS='
       submakeopts << 'EXTSOLIBS="$(EXTLIBS)"'
       submakeopts << 'LIBRUBY_SO_UPDATE=$(LIBRUBY_EXTS)'
     else
-      submakeopts << 'EXTOBJS="$(EXTOBJS) $(ENCOBJS)"'
+      submakeopts << 'EXTOBJS="$(EXTOBJS) $(EXTENCS)"'
       submakeopts << 'EXTLIBS="$(EXTLIBS)"'
     end
     submakeopts << 'EXTLDFLAGS="$(EXTLDFLAGS)"'
@@ -727,14 +727,15 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L727
     mf.puts
     mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})"
     submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)"
-    mf.puts "all static: $(EXTOBJS)\n\t#{submake} #{rubies.join(' ')}\n"
+    mf.puts "all static: #{rubies.join(' ')}\n"
     $extobjs.each do |tgt|
       mf.puts "#{tgt}: #{File.dirname(tgt)}/static"
     end
-    mf.puts "#{rubies.join(' ')}: $(EXTOBJS)"
+    mf.puts "#{rubies.join(' ')}: $(EXTOBJS)#{' libencs' if CONFIG['ENCSTATIC'] == 'static'}"
     rubies.each do |tgt|
       mf.puts "#{tgt}:\n\t#{submake} $@"
     end
+    mf.puts "libencs:\n\t$(Q)$(MAKE) -f enc.mk V=$(V) $@"
     mf.puts "ext/extinit.#{$OBJEXT}:\n\t$(Q)$(MAKE) $(MFLAGS) V=$(V) $@" if $static
     mf.puts
     if $gnumake == "yes"
Index: common.mk
===================================================================
--- common.mk	(revision 55433)
+++ common.mk	(revision 55434)
@@ -202,7 +202,7 @@ configure-ext: $(EXTS_MK) https://github.com/ruby/ruby/blob/trunk/common.mk#L202
 
 build-ext: $(EXTS_MK)
 	$(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \
-	    ENCOBJS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
+	    EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC)
 
 prog: program wprogram
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55433)
+++ ChangeLog	(revision 55434)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Jun 18 10:13:37 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
+	  different than ENCOBJS, to get rid of circular dependency.
+	  build libencs when linking encodings statically.
+	  [ruby-core:75618] [Bug #12401]
+
 Sat Jun 18 08:52:46 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/stringio/stringio.c (strio_getline): fix pointer index

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]