ruby-changes:17385
From: yugui <ko1@a...>
Date: Sat, 2 Oct 2010 20:20:34 +0900 (JST)
Subject: [ruby-changes:17385] Ruby:r29391 (ruby_1_9_2): merges r29101 from trunk into ruby_1_9_2.
yugui 2010-10-02 20:20:14 +0900 (Sat, 02 Oct 2010) New Revision: 29391 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29391 Log: merges r29101 from trunk into ruby_1_9_2. -- Creating dummy library for dl/fiddle tests on AIX. Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/test/dl/test_base.rb branches/ruby_1_9_2/test/fiddle/helper.rb branches/ruby_1_9_2/version.h Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 29390) +++ ruby_1_9_2/ChangeLog (revision 29391) @@ -1,3 +1,9 @@ +Thu Aug 26 10:38:11 2010 Yutaka Kanemoto <kanemoto@r...> + + * test/dl/test_base.rb: AIX does not have dynamically loadable lib[cm]. + + * test/fiddle/helper.rb: AIX does not have dynamically loadable lib[cm]. + Wed Aug 25 03:42:43 2010 NAKAMURA Usaku <usa@r...> * ext/dl/cfunc.c (rb_dlcfunc_call): workaround for VC9 for x64. Index: ruby_1_9_2/version.h =================================================================== --- ruby_1_9_2/version.h (revision 29390) +++ ruby_1_9_2/version.h (revision 29391) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.2" #define RUBY_RELEASE_DATE "2010-10-02" -#define RUBY_PATCHLEVEL 11 +#define RUBY_PATCHLEVEL 12 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 Index: ruby_1_9_2/test/fiddle/helper.rb =================================================================== --- ruby_1_9_2/test/fiddle/helper.rb (revision 29390) +++ ruby_1_9_2/test/fiddle/helper.rb (revision 29391) @@ -38,6 +38,34 @@ when /bsd|dragonfly/ libc_so = "/usr/lib/libc.so" libm_so = "/usr/lib/libm.so" +when /aix/ + pwd=Dir.pwd + libc_so = libm_so = "#{pwd}/libaixdltest.so" + unless File.exist? libc_so + cobjs=%w!strcpy.o! + mobjs=%w!floats.o sin.o! + funcs=%w!sin sinf strcpy strncpy! + expfile='dltest.exp' + require 'tmpdir' + Dir.mktmpdir do |dir| + begin + Dir.chdir dir + %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! + %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! + %x!echo "#{funcs.join("\n")}\n" > #{expfile}! + require 'rbconfig' + if RbConfig::CONFIG["GCC"] = 'yes' + lflag='-Wl,' + else + lflag='' + end + flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" + %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! + ensure + Dir.chdir pwd + end + end + end else libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ Index: ruby_1_9_2/test/dl/test_base.rb =================================================================== --- ruby_1_9_2/test/dl/test_base.rb (revision 29390) +++ ruby_1_9_2/test/dl/test_base.rb (revision 29391) @@ -47,6 +47,34 @@ end libc_so = File.join(libdir, "libc.so.6") libm_so = File.join(libdir, "libm.so.6") +when /aix/ + pwd=Dir.pwd + libc_so = libm_so = "#{pwd}/libaixdltest.so" + unless File.exist? libc_so + cobjs=%w!strcpy.o! + mobjs=%w!floats.o sin.o! + funcs=%w!sin sinf strcpy strncpy! + expfile='dltest.exp' + require 'tmpdir' + Dir.mktmpdir do |dir| + begin + Dir.chdir dir + %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! + %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! + %x!echo "#{funcs.join("\n")}\n" > #{expfile}! + require 'rbconfig' + if RbConfig::CONFIG["GCC"] = 'yes' + lflag='-Wl,' + else + lflag='' + end + flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" + %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! + ensure + Dir.chdir pwd + end + end + end else libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/