Skip to content

Instantly share code, notes, and snippets.

@caius
Created April 11, 2014 09:16
Show Gist options
  • Save caius/10452604 to your computer and use it in GitHub Desktop.
Save caius/10452604 to your computer and use it in GitHub Desktop.
Patch for 1.9.3-p545 to enable `dl' extension compiling under clang. Thanks to http://lists.freebsd.org/pipermail/freebsd-ruby/2014-February/004085.html for the patch
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index 898e4a7..122cf19 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -1,7 +1,9 @@
require 'mkmf'
if RbConfig::CONFIG['GCC'] == 'yes'
- $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer"
+ # $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer"
+ $CFLAGS << " -fno-defer-pop" unless have_macro("__clang__")
+ $CFLAGS << " -fno-omit-frame-pointer"
end
$INSTALLFILES = [
@caius
Copy link
Author

caius commented Apr 11, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment