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

ruby-changes:43826

From: nobu <ko1@a...>
Date: Mon, 15 Aug 2016 11:46:57 +0900 (JST)
Subject: [ruby-changes:43826] nobu:r55899 (trunk): extmk.rb: no static-ext in gems

nobu	2016-08-15 11:46:53 +0900 (Mon, 15 Aug 2016)

  New Revision: 55899

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

  Log:
    extmk.rb: no static-ext in gems
    
    * ext/extmk.rb (extmake): extension libraries in gems cannot link
      statically.

  Modified files:
    trunk/ChangeLog
    trunk/ext/extmk.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 55898)
+++ ChangeLog	(revision 55899)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Aug 15 11:46:50 2016  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/extmk.rb (extmake): extension libraries in gems cannot link
+	  statically.
+
 Sun Aug 14 22:35:40 2016  Nobuyoshi Nakada  <nobu@r...>
 
 	* id_table.c (hash_table_extend): should not shrink the table than
Index: ext/extmk.rb
===================================================================
--- ext/extmk.rb	(revision 55898)
+++ ext/extmk.rb	(revision 55899)
@@ -131,7 +131,7 @@ def extract_makefile(makefile, keep = tr https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L131
   true
 end
 
-def extmake(target, basedir = 'ext')
+def extmake(target, basedir = (maybestatic = 'ext'))
   unless $configure_only || verbose?
     print "#{$message} #{target}\n"
     $stdout.flush
@@ -269,7 +269,7 @@ def extmake(target, basedir = 'ext') https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L269
     end
     if $static and ok and !$objs.empty? and !noinstall
       args += ["static"] unless $clean
-      $extlist.push [$static, target, $target, $preload]
+      $extlist.push [(maybestatic ? $static : false), target, $target, $preload]
     end
     FileUtils.rm_f(old_cleanfiles - $distcleanfiles - $cleanfiles)
     FileUtils.rm_f(old_objs - $objs)
@@ -613,7 +613,8 @@ unless $extlist.empty? https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L613
   list = $extlist.dup
   built = []
   while e = list.shift
-    _, target, feature, required = e
+    static, target, feature, required = e
+    next unless static
     if required and !(required -= built).empty?
       l = list.size
       if (while l > 0; break true if required.include?(list[l-=1][1]) end)
@@ -737,7 +738,8 @@ if $configure_only and $command_output https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L738
     mf.puts
     targets = %w[all install static install-so install-rb clean distclean realclean]
     targets.each do |tgt|
-      mf.puts "#{tgt}: $(extensions:/.=/#{tgt}) $(gems:/.=/#{tgt})"
+      mf.puts "#{tgt}: $(extensions:/.=/#{tgt})"
+      mf.puts "#{tgt}: $(gems:/.=/#{tgt})" unless tgt == 'static'
       mf.puts "#{tgt}: note" unless /clean\z/ =~ tgt
     end
     mf.puts

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

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