aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-13 07:30:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-13 07:30:24 +0000
commit8699e3e52574afaed1fcbed17198009498110ad4 (patch)
treee7a0db8292accbf27685d942ec2cd94bee1efbbf
parent2cfae9b60fd08717d22b55e9b4f3ede91b532324 (diff)
downloadruby-8699e3e52574afaed1fcbed17198009498110ad4.tar.gz
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--configure.in1
-rw-r--r--ext/extmk.rb9
3 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ff20fdc867..93eadaeefa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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