summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2018-06-27hijack SIGCHLD handler for internal usenormal
Use a global SIGCHLD handler to guard all callers of rb_waitpid. To work safely with multi-threaded programs, we introduce a VM-wide waitpid_lock to be acquired BEFORE fork/vfork spawns the process. This is to be combined with the new ruby_waitpid_locked function used by mjit.c in a non-Ruby thread. Ruby-level SIGCHLD handlers registered with Signal.trap(:CHLD) continues to work as before and there should be no regressions in any existing use cases. Splitting the wait queues for PID > 0 and groups (PID <= 0) ensures we favor PID > 0 callers. The disabling of SIGCHLD in rb_f_system is longer necessary, as we use deferred signal handling and no longer make ANY blocking waitpid syscalls in other threads which could "beat" the waitpid call made by rb_f_system. We prevent SIGCHLD from firing in normal Ruby Threads and only enable it in the timer-thread, to prevent spurious wakeups from in test/-ext-/gvl/test_last_thread.rb with MJIT enabled. I've tried to guard as much of the code for RUBY_SIGCHLD==0 using C "if" statements rather than CPP "#if" so to reduce the likelyhood of portability problems as the compiler will see more code. We also work to suppress false-positives from Process.wait(-1, Process::WNOHANG) to quiets warnings from spec/ruby/core/process/wait2_spec.rb with MJIT enabled. Lastly, we must implement rb_grantpt for ext/pty. We need a MJIT-compatible way of supporting grantpt(3) which may spawn the `pt_chown' binary and call waitpid(2) on it. [ruby-core:87605] [Ruby trunk Bug#14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22remove DISABLE_RUBYGEMS from config filesnobu
* configure.ac: removed DISABLE_RUBYGEMS macro from config.h, not to rebuild everything when the flag changed. * configure.ac, win32/configure.bat: make USE_RUBYGEMS lowercase. * tool/mkconfig.rb: remove RUBYGEMS stuff from rbconfig.rb, not to reconfigure and rebuild all extension libraries. * Makefile.in (CPPFLAGS): enable/disable Rubygems by USE_RUBYGEMS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-14prefer clock_gettimenobu
* configure.ac: clock_gettime or gettimeofday must exist. * process.c (rb_clock_gettime): prefer clock_gettime over gettimeofday, as the latter is obsolete in SUSv4. * random.c (fill_random_seed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-16configure.ac: move the checks of _XOPEN_SOURCE on Solarisngoto
* configure.ac (solaris*): Move the checks of _XOPEN_SOURCE to the location before r63443, to cover non-GCC compilers on Solaris. This partly reverts r63443. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-16configure.ac: move checks of -std=gnu99 and _XOPEN_SOURCE on Solarisngoto
* configure.ac (ansi_options): On Solaris, "-std=gnu99" should be appended to CPPFLAGS instead of warnflags and strict_warnflags, because the flag affects existance of functions and macros. * configure.ac (solaris*): Check _XOPEN_SOURCE just after checking "-std=gnu99" on Solaris. Because _XOPEN_SOURCE also affects existance of many functions and macros, it is good to define it earlier. The check is simplified to use AC_TRY_COMPILE with RUBY_WERROR_FLAG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-16configure.ac: revert r63438ngoto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15Change logic to check _XOPEN_SOURCE on Solarisngoto
* configure.ac: Change logic to check _XOPEN_SOURCE on Solaris. With _XOPEN_SOURCE, "-std=gnu99" may also be added to CPPFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15configure.ac: maybe with jemallocnobu
* configure.ac (--with-jemalloc): accept `maybe` (other than `yes` and `no`), check for jemalloc and use it if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-15-Wno-cast-function-typeshyouhei
GCC 8.1+ introduced this warning in -Weverything. It does shed some lights on something, but rather annoying than useful ATM. Might be a subject to revert this option in a future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-11configure.ac: remove ineffective check on Solaris with GCCngoto
* configure.ac (solaris): Remove ineffective check for -std=iso9899:1999 on Solaris with GCC. The "-std=iso9899:1999" was replaced by "-std=gnu99" by the commit r54895. The check is no longer effective after that, and two years have passed without error reports. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-29Remove the teeny part from the shared library name on macOSknu
This will prevent macOS users from having to rebuild all extension libraries every time they upgrade ruby to a new teeny release. Before: - libruby.2.6.0.dylib - libruby.2.6.dylib -> libruby.2.6.0.dylib - libruby.dylib -> libruby.2.6.0.dylib After: - libruby.2.6.dylib - libruby.dylib -> libruby.2.6.dylib git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-09Prefer alignof() over _Alignof()shyouhei
to allow C++ programs include <ruby.h>. [Bug #14668] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-03Honor --silent optionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-27configure.ac: string literal concatenationnobu
* configure.ac: bail out if string literal concatenation is not available, as it is used everywhere now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-24configure.ac: named blocksnobu
* configure.ac: turned section block comments into named blocks. http://c16e.com/1603281120/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-16configure.ac: DLDFLAGS without arch flagsnobu
* configure.ac (DLDFLAGS): copy LDFLAGS before adding arch flags. multiple arch flags on universal binary make mjit_header.h failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-15configure.ac: fix rb_cv_gcc_compiler_casnobu
* configure.ac (rb_cv_gcc_compiler_cas): do not use one variable for multiple AC_CACHE_CHECK. in one check, select by different values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-14configure.ac: basic libsnobu
* configure.ac: basic libraries like -lm are necessary for some extension libraries on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09configure.ac: --disable-mathn optionnobu
* Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN from config.h which affects all extension libraries to XCFLAGS for the core only. * configure.ac: added --disable-mathn option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-03mjit_config.h: MJIT_LDSHAREDnobu
* configure.in (MJIT_LDSHARED): define based on LDSHARED with replacing CC with MJIT_CC. * Makefile.in, win32/Makefile.sub (mjit_config.h): instead of the default LDSHARED, use MJIT_LDSHARED to link mjit shared objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02configure.ac: library options to MAINLIBSnobu
* configure.ac (MAINLIBS): moved library options for main program and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as these libraries are not needed for linking to shared libruby. [ruby-core:85882] [Bug #14422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-02configure.ac: fix up r59130nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-01MJIT specific flagsnobu
Passing options to configure like as `configure MJIT_OPTFLAGS=-O MJIT_DEBUGFLAGS=-g` overrides options to be used to compile JIT code, separately from the default options to be used for ruby itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18mjit.c: no va_copynobu
* mjit.c (form_args): do not use va_copy, which cannot detect appropriate way to simulate when cross compiling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-17configure.ac: check clockid_t with necessary headersnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-15thread_pthread.c: Use `getpagesize()` when `pthread_attr_getguardsize` is ↵mame
unavailable This is also for emscripten. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-15configure.ac: Use `pthread_create` to determine if pthread is availablemame
Instead of `pthread_kill`. This is because emscripten supports `pthread_create` but not `pthread_kill`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-08MJIT header for multiarchnobu
* configure.ac: MJIT_HEADER_INSTALL_DIR to rubyarchhdrdir to support multiarch. * Makefile.in (MJIT_HEADER_INSTALL_DIR): configured by multiarch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06configure.ac: removed unnecessary pushdef/popdefnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-06deal with aclocal(1)shyouhei
This commit updates files so that aclocal.m4 generated by aclocal(1) works well with our configure.ac * ac_checking.m4: merged back to configure.ac because aclocal(1) cannot handle this macro. * ruby_append_options.m4: no longer used. * ruby_check_va_copy.m4: define using AC_DEFUN so that aclocal(1) can find this macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-05va_copy is a C99ismshyouhei
Should provide appropriate fallback implementation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-04common.mk: rb_mjit_header.hnobu
* common.mk (rb_mjit_header.h): moved from Makefile.in and win32/Makefile.sub. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-27Fix duplicated HAVE_NANkazu
And remove redundant `HAVE_*` macros, and use `USE_RB_*` macros instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-20set AC_CONFIG_MACRO_DIRS [close GH-1793]shyouhei
We do not use aclocal(1) by default. But in case users do so, AC_CONFIG_MACRO_DIRS help them reconstruct the same contents as this commit includes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-20refactor split configure.ac into filesshyouhei
This does not (yet) change anything. The generated configure file is the identical to previous one (except several empty lines added and deleted). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-20add missing/nan.cshyouhei
instead of scattering #ifdef HAVE_NANF here and there define our own nan() unless defined elsewhere. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-19there is no guarantee that mode_t is as wide as intshyouhei
POSIX only defines mode_t to be "an integer typea", and in fact MacOS defines it to be uint16_t. We didn't have NUM2USHORT before so it did not make sense but now that we have it. Why not check apptopriately. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-19INFINITY is float. That of double is HUGE_VAL.shyouhei
It seems HUGE_VAL is already used. Why not eliminate INTINITY. NAN is also float. That of double is called nan(). This is also fixed. Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-18-Wmissing-noreturnshyouhei
This is the -Wsuggest-attribute=noreturn equivalent option for clang. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-16-Wno-overlength-stringsshyouhei
as per https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Assumptions we are officially giving up 509 characters limit of C string literal length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15sorry, this hunk was a garbage. [ci skip]shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15__builtin_alloca_with_align for optimal memory accessshyouhei
ALLOCA_N takes type arugment. It is natural that the returned value to be used as an array of type, thus type-aligned. Luckily GCC has a builtin to tell compiler such alignment info. This should generate beter instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15__builtin_assume_aligned for *(foo *) castsshyouhei
These casts are guarded. Must be safe to assume alignments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15__alignof__ to take alignment of a typeshyouhei
C11 and C++11 has this feature so why not use it when available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-15__attibute__((__aligned__)) for RSTRING_PTR()shyouhei
For instance array.c:rb_ary_product() uses RSTRING_PTR() as an array of int. So to avoid misaligned memory access RSTRING_PTR() must at least be sizeof(int)-aligned. However the type of RSTRING_PTR() is char*, which of course can expect alignment as much as 1. This is a problem. The reality is, there is no misaligned memory access because the memory region behind RSTRING_PTR() is allocated using malloc(). Memory regions returned from malloc() are always aligned appropriately. So let's tell the compiler about this information. It seems GCC, clang, and MSVC have such feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-13Fix a typo.hsbt
configure.ac: delcares -> declares. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09thread_pthread: remove checks for pthread_cond*_initnormal
These were added for NaCL support in r36022, and we dropped NaCL in r60374. IMHO, any pthreads implementation without these basic functions is not worth the time to support. [ruby-core:84758] [Misc #14342] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefsnormal
ifdefs make code confusing for my easily-confused mind :< These were added for NaCL support in r36022, and we dropped NaCL in r60374. There are more #ifdefs to remove... [ruby-core:84758] [Misc #14342] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27fix fd mask detection on os xnobu
This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c) [Bug #14248] From: Stefan Kaes <skaes@railsexpress.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-15initialize should be outsidenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e