diff options
Diffstat (limited to 'ext/dl')
-rw-r--r-- | ext/dl/extconf.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb index 4ef46f85fb..53e73c3a8b 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 |