summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2020-02-20Prefer alignas() over _Alignas()Yusuke Endoh
to allow Intel C++ compiler to read ruby.h. This is similar to 9930481a239fa7182429f3c3942ea033fb9b0320
2020-01-31support C++ std::nullptr_t卜部昌平
C++ keyword `nullptr` represents a null pointer (note also that NULL is an integer in C++ due to its design flaw). Its type is `std::nullptr_t`, defined in <cstddef> standard header. Why not support it when the backend implementation can take a null pointer as an argument.
2020-01-10avoid undefined behaviour when n==0卜部昌平
ISO/IEC 9899:1999 section 6.5.7 states that "If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined". So we have to take care of such situations. This has not been a problem because contemporary C compilers are extraordinary smart to compile the series of shifts into a single ROTLQ/ROTRQ machine instruction. In contrast to what C says those instructions have fully defined behaviour for all possible inputs. Hence it has been quite difficult to observe the undefined-ness of such situations. But undefined is undefined. We should not rely on such target-specific assumptions. We are fixing the situation by carefully avoiding shifts with out-of- range values. At least GCC since 4.6.3 and Clang since 8.0 can issue the exact same instructions like before the changeset. Also in case of Intel processors, there supposedly be intrinsics named _rotr/_rotl that do exactly what we need. They, in practice, are absent on Clang before 9.x so we cannot blindly use. But we can at least save MSVC. See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57157 https://bugs.llvm.org/show_bug.cgi?id=17332 Notes: Merged: https://github.com/ruby/ruby/pull/2824
2020-01-03modify MJIT_CC only on RUBY_DEBUG=ciKoichi Sasada
Modify MJIT_CC (27fae1d4ad) only on CI environment.
2020-01-03disable ccache if $CC is in /usr/lib/ccache/$CC.Koichi Sasada
MJIT with ccache has a problem on docker environment, so we need to use original CC (/usr/bin/gcc, for example). Ubuntu system provides /usr/lib/ccache/gcc and so on to use gcc with ccache. It is easy to setup ccache by adding /usr/lib/ccache to $PATH. However we need to use /usr/bin/gcc (and so on) for MJIT_CC. We can specify MJIT_CC option at configure, but specifying them is troublesome. This patch choose original $CC (/usr/bin/gcc, for example) if $CC is /usr/lib/ccache/$CC.
2019-12-28Use __func__ as rb_cv_function_name_string on OpenBSDJeremy Evans
The use of RUBY_WERROR_FLAG causes this test to fail on OpenBSD platforms that use the binutils linker (ld.bfd) instead of the llvm linker (ld.lld), due to warnings added to the binutils linker in OpenBSD. Removing the RUBY_WERROR_FLAG would probably also fix it, but that would affect other platforms. This should also be backported to Ruby 2.7. Analysis and similar fix recommended by George Koehler. Notes: Merged: https://github.com/ruby/ruby/pull/2790
2019-12-26add several __has_something macro卜部昌平
With these macros implemented we can write codes just like we can assume the compiler being clang. MSC_VERSION_SINCE is defined to implement those macros, but turned out to be handy for other places. The -fdeclspec compiler flag is necessary for clang to properly handle __has_declspec(). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-12-13Allow more than one major version number in target_osMatt Valentine-House
2019-12-11support cross-compilation.Koichi Sasada
On cross-compilation, compiled binary can no be created because compiled binary should be created by same interpreter (on cross- compilation, host ruby is used to build ruby (BASERUBY)). So that cross-compilation system loads required scripts in text. It is same as miniruby. Notes: Merged: https://github.com/ruby/ruby/pull/2735
2019-12-03Fixed the inverted conditionNobuyoshi Nakada
2019-12-03Wrap statements in AS_IF properlyNobuyoshi Nakada
2019-12-02Disable _FORTIFY_SOURCE on mingw for nowNobuyoshi Nakada
It causes a link error due to some `__*_chk` functions on mingw.
2019-11-06Improve string literal concatenation for C++11Mark Abraham
Downstream C++ projects that compile with C++11 or newer and include the generated config.h file issue compiler warnings. Both C and C++ compilers do string-literal token pasting regardless of whitespace between the tokens to paste. C++ compilers since C++11 require such spaces, to avoid ambiguity with the new style of string literals introduced then. This change fixes such projects without affecting core Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2650
2019-10-29Check for nonnull attribute in configureNobuyoshi Nakada
2019-10-29Revert "Check for nonnull attribute in configure"卜部昌平
This reverts commit 54eb51d72bc43f90b595f0d7ffb5069ebf1a56d9. Windows build failure. See also https://github.com/ruby/ruby/runs/278718805
2019-10-29Check for nonnull attribute in configureNobuyoshi Nakada
2019-10-20show BASERUBY version at configure.Koichi Sasada
2019-09-10oops卜部昌平
Silly typo.
2019-09-10fix CentOS 6 compile error卜部昌平
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
2019-09-09Default to cc/c++ instead of gcc/g++ on OpenBSDJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2443
2019-09-06Stop setting same flags as cflags to cxxflagsNobuyoshi Nakada
2019-09-06Check clang++ as CXX when CXX is bare clang without suffixNobuyoshi Nakada
2019-08-27Fix the appropriate C++ compiler in OS X selectionKazuhiro NISHIYAMA
Merge space and slash to character class and add missing `CXX=` before `=g++-4.2` at 5e10cb04e88c8a95ee44f6cad2bdf264e0dff92a
2019-08-26Refined the appropriate C++ compiler in OS X selectionNobuyoshi Nakada
Allows CC to be prefixed another path or command, e.g., ccache.
2019-08-25configure.ac: Improve icc_version guessing for non-icc environmentYusuke Endoh
icc_version was wrongly defined as "__ICC" on non-icc C compiler, which caused a warning: ``` ./configure: line 8211: test: __ICC: integer expression expected ``` This change adds a sed commend to delete "__ICC".
2019-08-25configure.ac: fix the guess of icc_versionYusuke Endoh
The icc_version guessing was accidentally disabled because of 61885c9b7ca8ccdaf53d7c365fbb86bad3294d88; `AC_PROG_CC_C99` changes CC like "icc -std=c99", and `AS_CASE(["x$CC"], [xicc],` does not match. The variable `icc_version` is eventually defined, so the `AS_CASE` is not needed. This change removes the `AS_CASE`.
2019-08-20Check whether syscall(2) is deprecated by actual warningsNobuyoshi Nakada
2019-08-20Check for minimum required OSX version earlierNobuyoshi Nakada
2019-08-20Bail out if unsupported old MacOSX is requiredNobuyoshi Nakada
2019-08-20Fixed the check for OSX versionNobuyoshi Nakada
Should compare minimum required version, and with the particular macro defined for each version. Also made the error messages consistent.
2019-08-19crash report on mac little updateDavid CARLIER
displaying vm info as Linux and FreeBSD. checking libproc as it is present only from 10.5 version. https://github.com/ruby/ruby/pull/2384
2019-08-17NetBSD native support of explicit_bzero's like feature (#2145)David CARLIER
2019-07-23Relaxed target_os matchingNobuyoshi Nakada
When target_alias is not empty, `-gnu` suffixed is not stripped. [Bug #16015]
2019-07-18Improve build process and coroutine implementation selection.Samuel Williams
2019-07-07Add coroutine context switch for i386-mingw32Lars Kanis
It's essentially a translation of Context.asm from Intel to AT&T syntax.
2019-07-01Use realpath(3) instead of custom realpath implementation if availableJeremy Evans
This approach is simpler than the previous approach which tries to emulate realpath(3). It also performs much better on both Linux and OpenBSD on the included benchmarks. By using realpath(3), we can better integrate with system security features such as OpenBSD's unveil(2) system call. This does not use realpath(3) on Windows even if it exists, as the approach for checking for absolute paths does not work for drive letters. This can be fixed without too much difficultly, though until Windows defines realpath(3), there is no need to do so. For File.realdirpath, where the last element of the path is not required to exist, fallback to the previous approach, as realpath(3) on most operating systems requires the whole path be valid (per POSIX), and the operating systems where this isn't true either plan to conform to POSIX or may change to conform to POSIX in the future. glibc realpath(3) does not handle /path/to/file.rb/../other_file.rb paths, returning ENOTDIR in that case. Fallback to the previous code if realpath(3) returns ENOTDIR. glibc doesn't like realpath(3) usage for paths like /dev/fd/5, returning ENOENT even though the path may appear to exist in the filesystem. If ENOENT is returned and the path exists, then fall back to the default approach.
2019-07-01Enable native fiber coroutines on i386-openbsdJeremy Evans
2019-06-26Use native coroutine implementation on OpenBSD-amd64Jeremy Evans
When using native fibers, do not load ucontext, as it isn't needed.
2019-06-26Do not attempt to use ucontext for fibers on OpenBSDJeremy Evans
OpenBSD does not support ucontext. There may be a more generic way to handle this, using the result of AC_CHECK_HEADERS(ucontext.h).
2019-06-26Restore updated implementation of arm32 coroutine code, but prefer ucontext.Samuel Williams
2019-06-26Revert "coroutine/arm32/Context.S: save/restore the registers via stack"Yusuke Endoh
This reverts commit 6df1814c08df93bbc0b3e7a73649bcf82e126064. It caused a SEGV again: https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190626T051707Z.fail.html.gz
2019-06-26Add `ucontext` coroutine implementation for generic fallback.Samuel Williams
2019-06-26coroutine/arm32/Context.S: save/restore the registers via stackYusuke Endoh
Retry of 518adcca0a and dbe232e24e
2019-06-25Revert 518adcca0a and dbe232e24eYusuke Endoh
518adcca0a: "Try using arm32 implementation for fibers." dbe232e24e: "Order of arguments might be incorrect in arm32 coroutine implementation." It seems to cause SEGV consistently on Ubuntu armv7l eabihf: https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T081710Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T111708Z.fail.html.gz
2019-06-24Try using arm32 implementation for fibers.Samuel Williams
2019-06-24Try using arm64 implementation for fibers.Samuel Williams
2019-06-24Use spaces for indentation in `configure.ac`.Samuel Williams
2019-06-19Remove IA64 support.Samuel Williams
2019-06-07Moved Makefile.in under templateNobuyoshi Nakada
2019-06-07Revert "Moved Makefile.in under template"Nobuyoshi Nakada
This reverts commits: * 6f9d5fafe040cb02a1278fbfcdcb8063d564824c * bb3c89b6437049e26669b2156310670d5e06e386 And remove the dependency of Makefile on Makefile.in transitionally.