1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext
nagachika 229c041f05 merge revision(s) d732bc51bdbfe7d66038731d42e01a511d13b5f8,633a1f15d8228236094ddee12e4e169d655ec49e,95f387f61a4a4ea92635da760b7de5b1e09bb84e,528a3a17977aa1843a26630c96635c3cb161e729,261569d4aac440f25de588cca365163ecf1124a2,e4a9e926f0fe0acf2fbe61da6e075a95d34be066,318be1cb2f9c6f04403c063a5618c6267012ee51,e1855100e46040e73630b378974c17764e0cccee,9cfa811b0f209d714f89fe0de6778c71f77556c7,b68dab866724aacc1cbc6b7d5e1f555dec092346: [Backport #17202]
Revert "Revert "Revert "[ruby/fiddle] Use ffi_closure_free by
	 default. (#20)"""

	This reverts commit 87f6154bb4.

	It turned out that the change fails to build on macOS

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/osx1014/ruby-master/log/20200304T074503Z.fail.html.gz
	```
	+ make 'TESTS=--hide-skip -v fiddle' RUBYOPT=-w test-all
	dyld: lazy symbol binding failed: Symbol not found: _ffi_closure_alloc
	  Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle
	  Expected in: flat namespace

	dyld: Symbol not found: _ffi_closure_alloc
	  Referenced from: /Users/hsbt/Documents/cb/tmp/build/20200304T074503Z/ruby/.ext/x86_64-darwin18/fiddle.bundle
	  Expected in: flat namespace

	make: *** [yes-test-all] Abort trap: 6
	```

	[ruby/fiddle] Use ffi_closure_free if available

	[ruby/fiddle] ffi_closure_free is available in the bundled libffi

	[ruby/fiddle] use ffi_closure_alloc only with 3.2 or later

	[ruby/fiddle] always use ffi_closure_alloc on Windows

	Fixed a typo

	Show libffi version only if set

	ext/fiddle/extconf.rb: check if ffi_closure_alloc is available

	to define HAVE_FFI_CLOSURE_ALLOC.
	The macro is used in closure.c, so have_func check is needed.

	If pkg-config is not installed, extconf.rb fails to detect the version
	of libffi, and does not add "-DUSE_FFI_CLOSURE_ALLOC=1" even when system
	libffi version is >= 3.2.

	If USE_FFI_CLOSURE_ALLOC is not defined, closure.c attempts to check if
	HAVE_FFI_CLOSURE_ALLOC is defined or not, but have_func was removed with
	528a3a1797, so the macro is always not
	defined.

	This resulted in this deprecation warning:

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu2004/ruby-master/log/20200512T123003Z.log.html.gz
	```
	compiling closure.c
	closure.c: In function 'initialize':
	closure.c:265:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
	  265 |     result = ffi_prep_closure(pcl, cif, callback, (void *)self);
	      |     ^~~~~~
	In file included from ./fiddle.h:42,
	                 from closure.c:1:
	/usr/include/x86_64-linux-gnu/ffi.h:334:1: note: declared here
	  334 | ffi_prep_closure (ffi_closure*,
	      | ^~~~~~~~~~~~~~~~
	```

	Do not try ffi_closure_alloc if libffi is <= 3.1

	Maybe due to e1855100e4, CentOS, RHEL, and
	Fedora CIs have started failing with SEGV.  Try to avoid
	ffi_closure_alloc on those environments.

	https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos8/ruby-master/log/20200512T183004Z.fail.html.gz
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/fedora32/ruby-master/log/20200512T183004Z.fail.html.gz
	https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200512T183003Z.fail.html.gz

	ext/fiddle/extconf.rb: Fix the condition of libffi <= 3.1

	ver is [3, 1, 0] which is not less then or equal to [3, 1]
2020-10-01 07:53:55 +09:00
..
-test- Clear all trace events during teardown 2020-03-30 19:15:11 +09:00
bigdecimal Update the version of bigdecimal to 2.0.0 (#2784) 2019-12-25 15:21:50 +09:00
cgi/escape Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
continuation Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
coverage Update dependencies 2019-11-18 23:16:22 +09:00
date [ruby/date] Bump version to 3.0.0 2019-11-30 14:48:44 +09:00
dbm [ruby/dbm] Bump version to 1.1.0 2019-11-30 18:01:54 +09:00
digest Suppress deprecation warnings of MD5 from Xcode 11.1 2019-10-12 18:47:06 +09:00
etc [ruby/etc] Bump version to 1.1.0 2019-11-30 18:11:01 +09:00
fcntl Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
fiber Update dependencies 2019-11-18 23:16:22 +09:00
fiddle merge revision(s) d732bc51bdbfe7d66038731d42e01a511d13b5f8,633a1f15d8228236094ddee12e4e169d655ec49e,95f387f61a4a4ea92635da760b7de5b1e09bb84e,528a3a17977aa1843a26630c96635c3cb161e729,261569d4aac440f25de588cca365163ecf1124a2,e4a9e926f0fe0acf2fbe61da6e075a95d34be066,318be1cb2f9c6f04403c063a5618c6267012ee51,e1855100e46040e73630b378974c17764e0cccee,9cfa811b0f209d714f89fe0de6778c71f77556c7,b68dab866724aacc1cbc6b7d5e1f555dec092346: [Backport #17202] 2020-10-01 07:53:55 +09:00
gdbm [ruby/gdbm] Bump version to 2.1.0 2019-11-30 18:14:38 +09:00
io Ruby 2.7 backport about IRB (#2990) 2020-03-30 19:09:50 +09:00
json Import json-2.3.0 from flori/json 2019-12-12 09:14:09 +09:00
monitor new_cond before mon_initialize 2019-12-04 13:36:41 +09:00
nkf Deprecate taint/trust and related methods, and make the methods no-ops 2019-11-18 01:00:25 +02:00
objspace Update dependencies 2019-11-18 23:16:22 +09:00
openssl OpenSSL 1.1.1 introduces a new '.include' directive. Update our config 2020-07-11 16:10:41 +09:00
pathname Remove unnecessary double bangs from Pathname#root? 2019-12-17 14:14:54 +09:00
psych ext/psych/extconf.rb: braced VPATH is for nmake only 2019-12-05 17:57:56 +09:00
pty rb_ensure now free from ANYARGS 2019-08-27 15:52:26 +09:00
racc/cparse Update the latest versions from upstream repository of racc 2019-10-30 21:36:59 +09:00
rbconfig/sizeof Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
readline Merge latest readline-ext 2020-09-16 21:09:17 +09:00
ripper Allow $10 and more in the Ripper DSL 2019-11-26 21:57:00 +09:00
rubyvm Added depend files 2019-07-14 01:31:29 +09:00
sdbm Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
socket ext/socket/init.c: do not return uninitialized buffer 2020-03-31 19:26:10 +09:00
stringio [ruby/stringio] StringIO#initialize default to the source string encoding 2020-03-15 20:53:14 +09:00
strscan Update dependencies 2019-11-18 23:16:22 +09:00
syslog Warn on access/modify of $SAFE, and remove effects of modifying $SAFE 2019-11-18 01:00:25 +02:00
win32 Include ruby/assert.h in ruby/ruby.h so that assertions can be there 2019-07-14 17:58:03 +09:00
win32ole merge revision(s) a0bc3f2a1c2c98f225612101cb4e1ea1a6813546,75a0447c15a7ab017bd4240c2a9cc69b134b80b9,f1699314147bad2cf5550cc582693424fdbc2510: [Backport #16846] 2020-07-26 16:19:40 +09:00
zlib [ruby/zlib] Bump version to 1.1.0 2019-11-30 18:21:52 +09:00
.document ext/.document: follow-up r59734 2017-09-03 13:31:34 +00:00
extmk.rb Configure static extensions only if in charge 2019-11-19 15:11:41 +09:00
Setup Removed deprecated extensions of mathn. 2017-04-20 08:21:24 +00:00
Setup.atheos
Setup.nt