From f4edf549b7b3362a187c4550e2e7c183b0123f07 Mon Sep 17 00:00:00 2001 From: eban Date: Fri, 4 Oct 2002 05:18:05 +0000 Subject: * 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: http://svn.ruby-lang.org/repos/ruby/trunk@2931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/extmk.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext') diff --git a/ext/extmk.rb b/ext/extmk.rb index 06d46f106..50b2890a2 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 -- cgit