summaryrefslogtreecommitdiff
path: root/configure.ac
AgeCommit message (Collapse)Author
2020-06-04No GITPULLOPTIONS by defaultNobuyoshi Nakada
To honor the environment variable, keep GITPULLOPTIONS unset by default, and appended the option to VCSUP.
2020-05-28Check that BASERUBY is at least Ruby 2.2 in configureJeremy Evans
BASERUBY needs to be at least Ruby 2.2 since 46acd0075d80c2f886498f089fde1e9d795d50c4. I think it's better to explicitly fail early as soon as BASERUBY is used in this case, versus trying to debug later failures. This modifies things to check both implicitly use of ruby in the PATH as BASERUBY, and explicitly specified older versions of ruby when using --with-baseruby. Fixes [Bug #16668] Notes: Merged: https://github.com/ruby/ruby/pull/2947
2020-05-23Allow Dir.home to work for non-login procs when $HOME not setAlan D. Salewski
Allow the 'Dir.home' method to reliably locate the user's home directory when all three of the following are true at the same time: 1. Ruby is running on a Unix-like OS 2. The $HOME environment variable is not set 3. The process is not a descendant of login(1) (or a work-alike) The prior behavior was that the lookup could only work for login-descended processes. This is accomplished by looking up the user's record in the password database by uid (getpwuid_r(3)) as a fallback to the lookup by name (getpwname_r(3)) which is still attempted first (based on the name, if any, returned by getlogin_r(3)). If getlogin_r(3), getpwnam_r(3), and/or getpwuid_r(3) is not available at compile time, will fallback on using their respective non-*_r() variants: getlogin(3), getpwnam(3), and/or getpwuid(3). The rationale for attempting to do the lookup by name prior to doing it by uid is to accommodate the possibility of multiple login names (each with its own record in the password database, so each with a potentially different home directory) being mapped to the same uid (as is explicitly allowed for by POSIX; see getlogin(3posix)). Preserves the existing behavior for login-descended processes, and adds the new capability of having Dir.home being able to find the user's home directory for non-login-descended processes. Fixes [Bug #16787] Related discussion: https://bugs.ruby-lang.org/issues/16787 https://github.com/ruby/ruby/pull/3034
2020-05-23Search pkg-config with ac_tool_prefix [Bug #16909]Nobuyoshi Nakada
Should prefer a prefixed version over the bare pkg-config for cross compiling.
2020-05-23Revert "Search pkg-config by AC_CHECK_TOOL [Bug #16909]"Nobuyoshi Nakada
This reverts commit 6006ab8cf93a0e06d9d65213eff3117965c9bd0c. AC_CHECK_TOOL does not have REJECT argument.
2020-05-23Search pkg-config by AC_CHECK_TOOL [Bug #16909]Nobuyoshi Nakada
It should use AC_CHECK_TOOL to automatically search for a prefixed version and not just the bare pkg-config.
2020-05-11BASERUBY have to be 1.9 or later at least [Bug #16845]Nobuyoshi Nakada
Many tools under tool directory haven't worked with ruby 1.8.
2020-05-11Fallback MAKE to makeNobuyoshi Nakada
2020-05-11Pass MAKE value to configure for non-default name caseNobuyoshi Nakada
GNU make does not export it by default.
2020-05-03Optimize sin/cosNobuyoshi Nakada
GCC/Clang can optimize to calculate `sin(x)` and `cos(x)` at once, when the both are closely called on the same argument. Similar optimization is possible for `__sinpi(x)` and `__cospi(x)` if available, which calculate arguments in radian, i.e. `sin(x*M_PI)` and `cos(x*M_PI)` respectively.
2020-04-22configure.ac: Automatically add -D__ANDROID_API=ver on AndroidYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/3049
2020-04-11Don't require sub-word atomicsAndreas Schwab
On some architectures (like RISC-V) sub-word atomics are only available when linking against -latomic, but the configure script doesn't do that, causing the atomic checks to fail and the resulting ruby binary is non-functional. Ruby does not use sub-word atomic operations, rb_atomic_t is defined to unsigned int, so use unsigned int when checking for atomic operations. Notes: Merged: https://github.com/ruby/ruby/pull/3016
2020-04-10configure: suppress SunPro warning卜部昌平
To this date there is no way for Oracle developer Studio to suppress warnings about unreachable codes (12.6 manual says it implemented __builtin_unreachable "as a no-op to C++. It might be added to C.") There is no way but globally kill the warning. Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-10configure: suppress icc warnings卜部昌平
Every time a pointer to/from VALUE conversion happens, these two warnings are issued: - warning #1684: conversion from pointer to same-sized integral type (potential portability problem) - warning #2312: pointer cast involving 64-bit pointed-to type Thank you, but we are well aware of the "potential portability problem". Let us ignore them all. Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-10configure: always check for __builtin_unreachable卜部昌平
Non-gcc compilers tend to have this intrinsic these days (e.g. icc). Better check it regardless of $GCC. Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-09configure.ac: Skip C++ compiler of Sun OpenStudioYusuke Endoh
It fails to compile ext/-test-/cxxanyargs/cxxanyargs.cpp. Need work to support it. Contribution is welcome.
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2020-04-05Use toodir also in configure.acNobuyoshi Nakada
2020-04-05Added tooldir variableNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3003
2020-04-01ucontext doesn't exist in a musl-libc env; use native assemblyPaul Jordan
Notes: Merged: https://github.com/ruby/ruby/pull/2995
2020-03-23Make file names and variable names consistentTakashi Kokubun
2020-03-24Moved MJIT_WITHOUT_TABS default to configure.acNobuyoshi Nakada
And then the environment variable.
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