summaryrefslogtreecommitdiff
path: root/ext
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 /ext
parent2cfae9b60fd08717d22b55e9b4f3ede91b532324 (diff)
* 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
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 0ed0559..60ee34b 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