summaryrefslogtreecommitdiff
path: root/ext/fiddle/extconf.rb
AgeCommit message (Collapse)Author
2017-09-12Merge fiddle-1.0.0.beta2 from upstream.hsbt
* ext/fiddle/closure.c: use directly declaration for standalone gem without internal.h. * Specify frozen string literal is true. * Update gemspec configuration for release version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-10fiddle: fix $(SUBMAKE_PRE)nobu
* ext/fiddle/extconf.rb: fix $(SUBMAKE_PRE) to chdir to $(LIBFFI_DIR) instead of $(@D), since $(LIBFFI_A) is not underneath libffi but under .libs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-09fiddle: jobserver for libffinobu
* ext/fiddle/depend (libffi): use $(MAKE) explicitly for recursive make, so that jobserver works. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-23fiddle: release GVL for ffi_callnormal
Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h * ext/fiddle/function.c (struct nogvl_ffi_call_args): new struct for GVL release (nogvl_ffi_call): new function (function_call): adjust for GVL release [ruby-core:71642] [Feature #11607] * ext/fiddle/closure.c (struct callback_args): new struct for GVL acquire (with_gvl_callback): adjusted original callback function (callback): wrapper for conditional GVL acquire * ext/fiddle/depend: add dependencies * ext/fiddle/extconf.rb: include top_srcdir for internal.h * internal.h (ruby_thread_has_gvl_p): expose for fiddle * vm_core.h (ruby_thread_has_gvl_p): moved to internal.h * test/fiddle/test_function.rb (test_nogvl_poll): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29fiddle: $LOCAL_LIBS needs to be expandednobu
* ext/fiddle/extconf.rb: revert part of r51401 and expand $LOCAL_LIBS as it will be extracted and copied to exts.mk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-27fiddle: unexpand LIBFFI_DIRnobu
* ext/fiddle/extconf.rb: use LIBFFI_DIR instead of expanding it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13libff: fix enable-shared conditionnobu
* ext/fiddle/extconf.rb: needs --enable-shared when linked to libruby or fiddle.so. since --with-static-linked-ext does no longer link extensions to ruby program with --enable-shared, the only combination needs --enable-static is --disable-shared and --with-static-linked-ext. [ruby-dev:48901] [Bug #10960] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17fiddle: --disable-bundled-libffinobu
* ext/fiddle/extconf.rb: disable bundled libffi if explicitly disabled by --disable-bundled-libffi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11fiddle: check assemblernobu
* ext/fiddle/extconf.rb: requires assembler for src/win{32,64}.S. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-30fiddle: append libffi config.lognobu
* ext/fiddle/extconf.rb: copy config.log of libffi when failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25extconf.rb: libffi PIC objectsnobu
* ext/fiddle/extconf.rb: make PIC objects if it will be linked as a shared object eventually. [ruby-core:67128] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24fiddle: win32/libffi-config.rbnobu
* ext/fiddle/win32/libffi-config.rb: generate necessary files to build on mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24* ext/fiddle/extconf.rb: remove ffitarget.h generated by configure onusa
mswin, because it's not normal file (cygwin's symlink) and have system attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: no empty CPPnobu
* ext/fiddle/extconf.rb: pass CPP only if necessary, should not make it empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extmk.rb: replace current directory namenobu
* ext/extmk.rb (extmake): replace "./" at beginning in LOCAL_LIBS with the current directory name for values cached in previous Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23fiddle: clean-libffinobu
* ext/fiddle/depend (clean-libffi): clean libffi directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: try modversion ff pkg_config succeedednobu
* ext/fiddle/extconf.rb: when pkg_config failed, module version is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23extconf.rb: libffi on mswinnobu
* ext/fiddle/extconf.rb: try to compile libffi as mingw on mswin if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22extconf.rb: libffi with librubynobu
* ext/fiddle/extconf.rb: link libffi with libruby for symbols provided by ruby on some platforms, e.g. alloca. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-22extconf.rb: configure libffi firstnobu
* ext/fiddle/extconf.rb: configure libffi for the check requires the headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: modversion may be unavailablenobu
* ext/fiddle/extconf.rb: modversion may be unavailable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: do not disturb other checksnobu
* ext/fiddle/extconf.rb: add the local ffi library and header just before create_makefile, not to disturb other checks. also prepend the extension path name to the local library name for static linked ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-21fiddle: fix build failuresnobu
* ext/fiddle/depend (build-libffi): get rid of eventually empty target for nmake. * ext/fiddle/extconf.rb: omit stuffs for libffi unless bundled libffi is found and used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-20fiddle: configure in mflagsnobu
* ext/fiddle/extconf.rb: configure is already in mflags, use system instead of xsystem which requires a string, and logging libffi configure output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-20fiddle: bundled libffinobu
* ext/fiddle/depend, ext/fiddle/extconf.rb: try to build bundled libffi if existing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-21fiddle/extconf.rb: supply 0nobu
* ext/fiddle/extconf.rb: supply 0 to fill RUBY_LIBFFI_MODVERSION with 3-digit. libffi 3.1 returns just 2-digit. [ruby-core:62920] [Bug #9897] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19* ext/fiddle/extconf.rb: ignore rc version of libffi to fix build failure.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* ext/fiddle/extconf.rb: define RUBY_LIBFFI_MODVERSION macro.naruse
* ext/fiddle/closure.c (USE_FFI_CLOSURE_ALLOC): define 0 or 1 with platform and libffi's version. [Bug #3371] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30* ext/fiddle/extconf.rb, ext/fiddle/function.cngoto
(Fiddle::Function::STDCALL): FFI_STDCALL is not a macro, but an enumeration. [ruby-core:50398] [Bug #7483] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27reverting r37881tenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-27* ext/fiddle/handle.c: Make Fiddle independent of DL, copy DL::Handletenderlove
to Fiddle::Handle. * ext/fiddle/pointer.c: Make Fiddle independent of DL, copy DL::Pointer to Fiddle::Pointer. * test/fiddle/test_func.rb: relevent tests * test/fiddle/test_handle.rb: ditto * test/fiddle/test_pointer.rb: ditto * ext/dl/lib/dl/struct.rb: use Fiddle::Pointer if available * ext/fiddle/extconf.rb: check for dlfcn.h * ext/fiddle/fiddle.c: add constants for sizeof() things * ext/fiddle/fiddle.h: include dlfcn.h * ext/fiddle/function.c: expose a C function for creating new Fiddle::Function objects. * ext/fiddle/lib/fiddle.rb: include constants for dl backwards compat * ext/fiddle/lib/fiddle/function.rb: read the pointer from the function for dl backwards compat. * test/dl/test_callback.rb: check the addresses of the pointers rather than their types. * test/fiddle/helper.rb: remove dependency on dl * test/fiddle/test_closure.rb: ditto * test/fiddle/test_fiddle.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* ext/fiddle/extconf.rb: Use an exception instaed of bare abort.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-25* ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_tnobu
and intptr_t. [ruby-core:42460][Feature #5992] * ext/fiddle/fiddle.c (Init_fiddle): ditto. * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-05* Use _WIN32 rather than checking for windows.h. Thanks Jon Forums!tenderlove
[ruby-core:33977] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27* ext/fiddle/extconf.rb: check for windows.h while building fiddle.tenderlove
Thanks Jon Forums! [ruby-core:33923] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04* ext/fiddle/extconf.rb: fixing ffi library location on windows.tenderlove
Thanks Usa! [ruby-core:32930] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-15* ext/fiddle/extconf.rb: check ffi.h even when pkg-config succeeded.mame
On Debian/lenny, which is a "supported" platform, ffi.h is installed in /usr/include/i486-linux-gnu/. This causes build error when using gcc whose target is not i486-linux-gnu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-15* ext/fiddle/extconf.rb: De Morgan's laws.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-15* ext/fiddle/extconf.rb: use pkg_config to find ffi.h.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06* ext/fiddle/*: Adding fiddle library to wrap libffitenderlove
* test/fiddle/*: testing fiddle extension * ext/dl/lib/dl.rb: Requiring fiddle if it is available * ext/dl/lib/dl/callback.rb: using Fiddle if it is available * ext/dl/lib/dl/func.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e