summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-20 03:21:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-20 03:21:52 +0000
commit3981d60ba2b7e0d027964fb7430e135ffd6f460d (patch)
treec617ca8867bc242c5ab31ac42058403654f2cb32 /ext/dl
parente0a0edf548ec518651f2571ac02a2716855b50d8 (diff)
dl/extconf.rb: check for -fno-defer-pop option
* ext/dl/extconf.rb: check for -fno-defer-pop option, since clang 5.1 no longer support -fno-defer-pop option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/extconf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index 4ef46f8..53e73c3 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -1,7 +1,12 @@
require 'mkmf'
if RbConfig::CONFIG['GCC'] == 'yes'
- (have_macro("__clang__") ? $LDFLAGS : $CFLAGS) << " -fno-defer-pop"
+ flag = " -fno-defer-pop"
+ if have_macro("__clang__")
+ $LDFLAGS << flag if try_ldflags(flag)
+ else
+ $CFLAGS << flag
+ end
$CFLAGS << " -fno-omit-frame-pointer"
end