mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/extmk.rb: add -Wl,--no-undefined to LDSHARED only
if GNU ld is 2.11 or later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8e19c02e8f
commit
ab6e5c655c
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Apr 24 19:40:02 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb: add -Wl,--no-undefined to LDSHARED only
|
||||
if GNU ld is 2.11 or later.
|
||||
|
||||
Wed Apr 23 14:05:40 2003 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/ipaddr.rb (include?): Support non-IPAddr parameters.
|
||||
|
|
|
@ -10,6 +10,7 @@ $extinit = nil
|
|||
$extobjs = nil
|
||||
$ignore = nil
|
||||
$message = nil
|
||||
$use_no_undef = nil
|
||||
|
||||
$progname = $0
|
||||
alias $PROGRAM_NAME $0
|
||||
|
@ -33,6 +34,12 @@ $topdir = File.expand_path(".")
|
|||
$top_srcdir = srcdir
|
||||
$hdrdir = $top_srcdir
|
||||
|
||||
if not $use_no_undef and /linux/ =~ RUBY_PLATFORM and
|
||||
$configure_args['--enable-shared'] and
|
||||
CONFIG["GNU_LD"] == "yes"
|
||||
$use_no_undef = 0 <= (`ld -v`.scan(/\d+/).map{|x| x.to_i} <=> [2, 11])
|
||||
end
|
||||
|
||||
def sysquote(x)
|
||||
@quote ||= /human|os2|macos/ =~ (CROSS_COMPILING || RUBY_PLATFORM)
|
||||
@quote ? x.quote : x
|
||||
|
@ -53,7 +60,7 @@ def extmake(target)
|
|||
|
||||
init_mkmf
|
||||
|
||||
if /linux/ =~ RUBY_PLATFORM and $configure_args['--enable-shared'] and CONFIG["GNU_LD"] == "yes"
|
||||
if $use_no_undef
|
||||
$DLDFLAGS << " -Wl,--no-undefined"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue