summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-04 05:18:05 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-04 05:18:05 +0000
commit5c57848093d4bc4ffc6140365707a879c7a7838c (patch)
tree287195e29184ce252439de17d083d85aadb0eaa7 /ext
parente6bb432c83584f174d9ccc24f6433a781aa9364d (diff)
* configure.in (RUBY_PROG_GNU_LD): check whether the linker is GNU ld.
* ext/extmk.rb (create_makefile): add -Wl,-no-undefined to $DLDFLAGS on Linux if GNU ld is used and --enable-shared is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/extmk.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 06d46f1064..50b2890a22 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -44,6 +44,7 @@ require 'shellwords'
$topdir = File.expand_path(".")
$top_srcdir = srcdir
+# avoid warning for $VERBOSE mode
Object.class_eval do remove_method :create_makefile end
def create_makefile(target)
@@ -64,6 +65,9 @@ def create_makefile(target)
end
$DLDFLAGS = CONFIG["DLDFLAGS"].dup
+ if /linux/ =~ RUBY_PLATFORM and $configure_args['--enable-shared'] and CONFIG["GNU_LD"] == "yes"
+ $DLDFLAGS << " -Wl,-no-undefined"
+ end
if $configure_args['--enable-shared'] or CONFIG["LIBRUBY"] != CONFIG["LIBRUBY_A"]
$libs = CONFIG["LIBRUBYARG"] + " " + $libs