diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | ext/extmk.rb | 9 |
3 files changed, 17 insertions, 3 deletions
@@ -1,3 +1,13 @@ +Wed Nov 13 16:22:38 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> + + * configure.in (DLDFLAGS): removed -Wl,-no-undefined to + ext/extmk.rb, in order to allow references to symbols in other + extension libraries for mkmf.rb. [ruby-dev:18724] + + * ext/extmk.rb (extmake): ditto. + + * ext/extmk.rb (extmake): exit when make failed. + Sun Nov 10 03:46:18 2002 Akinori MUSHA <knu@iDaemons.org> * lib/set.rb: retire contain?() and add superset?(), diff --git a/configure.in b/configure.in index 0e4bc356e6..1ed61aba9d 100644 --- a/configure.in +++ b/configure.in @@ -1053,7 +1053,6 @@ if test "$enable_shared" = 'yes'; then linux*) LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' - test "$rb_cv_prog_gnu_ld" = yes && DLDFLAGS="$DLDFLAGS -Wl,-no-undefined" ;; gnu*) LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' diff --git a/ext/extmk.rb b/ext/extmk.rb index 0ed0559e97..60ee34b226 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -41,6 +41,10 @@ def extmake(target) init_mkmf + if /linux/ =~ RUBY_PLATFORM and $configure_args['--enable-shared'] and CONFIG["GNU_LD"] == "yes" + $DLDFLAGS << " -Wl,-no-undefined" + end + begin dir = Dir.pwd File.mkpath target unless File.directory?(target) @@ -70,7 +74,7 @@ def extmake(target) $extlist.push [$static, $target, File.basename($target)] end unless system($make, *$mflags) - $ignore or $continue or exit(1) + $ignore or $continue or return false end else open("./Makefile", "w") {|f| @@ -91,6 +95,7 @@ def extmake(target) rm_f "conftest*" Dir.chdir dir end + true end require 'getopts' @@ -175,7 +180,7 @@ ext_prefix = "#{$top_srcdir}/ext" Dir.glob("#{ext_prefix}/**/MANIFEST") do |d| d = File.dirname(d) d.slice!(0, ext_prefix.length + 1) - extmake(d) + extmake(d) or exit(1) end if $ignore |