diff options
Diffstat (limited to 'ext/ffi_c/extconf.rb')
-rwxr-xr-x[-rw-r--r--] | ext/ffi_c/extconf.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb index 720fb06..b3eb020 100644..100755 --- a/ext/ffi_c/extconf.rb +++ b/ext/ffi_c/extconf.rb @@ -33,7 +33,7 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx' $CFLAGS.gsub!(/[\s+]-ansi/, '') $CFLAGS.gsub!(/[\s+]-std=[^\s]+/, '') # solaris 10 needs -c99 for <stdbool.h> - $CFLAGS << " -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris(!?2\.11)/ + $CFLAGS << " -g -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris(!?2\.11)/ # Check whether we use system libffi system_libffi = enable_config('system-libffi', :try) @@ -57,10 +57,13 @@ if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx' append_ldflags "-Wl,--exclude-libs,ALL" end + have_func 'rb_gc_mark_movable' # since ruby-2.7 + # Some linux archs need explicit linking to pthread, see https://github.com/ffi/ffi/issues/893 append_ldflags "-pthread" ffi_alloc_default = RbConfig::CONFIG['host_os'] =~ /darwin/i && RbConfig::CONFIG['host'] =~ /arm|aarch64/i + ffi_alloc_default = ffi_alloc_default || RbConfig::CONFIG['host'] =~ /hppa/i if enable_config('libffi-alloc', ffi_alloc_default) $defs << "-DUSE_FFI_ALLOC" end |