summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 01:13:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-18 01:13:39 +0000
commitc15ad4a4ac0f92f8828aafcad35e50ddce22e712 (patch)
tree7b5cb708a17bc297666451db0459706195bf23fd
parent9a96068975bc0e443209c3c48365036c6f3c7a6d (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--common.mk2
-rwxr-xr-xext/extmk.rb9
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 914b57c10dd..424e72d18db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat Jun 18 10:13:37 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* ext/stringio/stringio.c (strio_getline): fix pointer index
diff --git a/common.mk b/common.mk
index 44786122b5e..b9ced6753e3 100644
--- a/common.mk
+++ b/common.mk
@@ -202,7 +202,7 @@ configure-ext: $(EXTS_MK)
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
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 220c55e09d0..3fe1115273f 100755
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -703,12 +703,12 @@ if $configure_only and $command_output
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
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"