summaryrefslogtreecommitdiff
path: root/ext/dl/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/extconf.rb')
-rw-r--r--ext/dl/extconf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index 8317ac35ad7..6d4d6c5d517 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -1,7 +1,8 @@
require 'mkmf'
if RbConfig::CONFIG['GCC'] == 'yes'
- $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer"
+ (have_macro("__clang__") ? $LDFLAGS : $CFLAGS) << " -fno-defer-pop"
+ $CFLAGS << " -fno-omit-frame-pointer"
end
$INSTALLFILES = [