1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

222 commits

Author SHA1 Message Date
Mark Abraham
07f2062c8f Improve string literal concatenation for C++11
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.
2019-11-06 00:31:52 +09:00
Nobuyoshi Nakada
ad4da86669
Check for nonnull attribute in configure 2019-10-29 16:38:15 +09:00
卜部昌平
9195ed18ca Revert "Check for nonnull attribute in configure"
This reverts commit 54eb51d72b.

Windows build failure. See also https://github.com/ruby/ruby/runs/278718805
2019-10-29 16:05:39 +09:00
Nobuyoshi Nakada
54eb51d72b
Check for nonnull attribute in configure 2019-10-29 12:12:07 +09:00
Koichi Sasada
9e07dfd253 show BASERUBY version at configure. 2019-10-20 16:16:54 +09:00
卜部昌平
487d290044 oops
Silly typo.
2019-09-10 16:04:17 +09:00
卜部昌平
20e428ec40 fix CentOS 6 compile error
See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-master/log/20190910T003005Z.fail.html.gz
2019-09-10 12:25:36 +09:00
Jeremy Evans
8d3db4f26c Default to cc/c++ instead of gcc/g++ on OpenBSD 2019-09-09 18:11:52 -07:00
Nobuyoshi Nakada
733aa2f8b5
Stop setting same flags as cflags to cxxflags 2019-09-06 18:43:41 +09:00
Nobuyoshi Nakada
dd26c9f333
Check clang++ as CXX when CXX is bare clang without suffix 2019-09-06 18:43:41 +09:00
Kazuhiro NISHIYAMA
76abd79629
Fix the appropriate C++ compiler in OS X selection
Merge space and slash to character class and add missing `CXX=` before `=g++-4.2`
at 5e10cb04e8
2019-08-27 10:43:37 +09:00
Nobuyoshi Nakada
5e10cb04e8
Refined the appropriate C++ compiler in OS X selection
Allows CC to be prefixed another path or command, e.g., ccache.
2019-08-26 11:07:34 +09:00
Yusuke Endoh
365e5b38a9 configure.ac: Improve icc_version guessing for non-icc environment
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-25 23:08:13 +09:00
Yusuke Endoh
11f7c30fa7 configure.ac: fix the guess of icc_version
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-25 22:16:26 +09:00
Nobuyoshi Nakada
19b0161b85
Check whether syscall(2) is deprecated by actual warnings 2019-08-20 02:14:28 +09:00
Nobuyoshi Nakada
588b74e8d8
Check for minimum required OSX version earlier 2019-08-20 02:14:28 +09:00
Nobuyoshi Nakada
9ee770a2ce
Bail out if unsupported old MacOSX is required 2019-08-20 02:14:28 +09:00
Nobuyoshi Nakada
af2c8d2836
Fixed the check for OSX version
Should compare minimum required version, and with the particular
macro defined for each version.  Also made the error messages
consistent.
2019-08-20 02:14:28 +09:00
David CARLIER
6dd9736c3a crash report on mac little update
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-19 17:36:28 +09:00
David CARLIER
28267cea08 NetBSD native support of explicit_bzero's like feature () 2019-08-17 14:17:30 +09:00
Nobuyoshi Nakada
03958a0c0d
Relaxed target_os matching
When target_alias is not empty, `-gnu` suffixed is not stripped.

[Bug ]
2019-07-23 18:22:25 +09:00
Samuel Williams
7291fef55c
Improve build process and coroutine implementation selection. 2019-07-18 20:54:54 +12:00
Lars Kanis
68e5804022
Add coroutine context switch for i386-mingw32
It's essentially a translation of Context.asm from Intel
to AT&T syntax.
2019-07-07 21:33:47 +12:00
Jeremy Evans
11c311e36f Use realpath(3) instead of custom realpath implementation if available
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-01 11:46:30 -07:00
Jeremy Evans
81fe82be4e Enable native fiber coroutines on i386-openbsd 2019-07-01 11:44:12 -07:00
Jeremy Evans
7172ab0ec5 Use native coroutine implementation on OpenBSD-amd64
When using native fibers, do not load ucontext, as it isn't needed.
2019-06-26 16:23:11 -07:00
Jeremy Evans
d004989ac6 Do not attempt to use ucontext for fibers on OpenBSD
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-26 07:53:54 -07:00
Samuel Williams
acb67472c7 Restore updated implementation of arm32 coroutine code, but prefer ucontext. 2019-06-26 22:02:28 +12:00
Yusuke Endoh
28eeaed8a9 Revert "coroutine/arm32/Context.S: save/restore the registers via stack"
This reverts commit 6df1814c08.

It caused a SEGV again:
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190626T051707Z.fail.html.gz
2019-06-26 17:23:00 +09:00
Samuel Williams
6c6bf9ffcb Add ucontext coroutine implementation for generic fallback. 2019-06-26 20:19:53 +12:00
Yusuke Endoh
6df1814c08 coroutine/arm32/Context.S: save/restore the registers via stack
Retry of 518adcca0a and dbe232e24e
2019-06-26 14:08:10 +09:00
Yusuke Endoh
730aeb2523 Revert 518adcca0a and dbe232e24e
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-25 23:32:26 +09:00
Samuel Williams
518adcca0a Try using arm32 implementation for fibers. 2019-06-24 19:09:27 +12:00
Samuel Williams
0e6396d2ac Try using arm64 implementation for fibers. 2019-06-24 15:13:17 +12:00
Samuel Williams
abdbfebad1 Use spaces for indentation in configure.ac. 2019-06-24 15:13:17 +12:00
Samuel Williams
d17344cfc5 Remove IA64 support. 2019-06-19 23:30:04 +12:00
Nobuyoshi Nakada
c7477c3e1f
Moved Makefile.in under template 2019-06-07 09:09:58 +09:00
Nobuyoshi Nakada
200c840b95
Revert "Moved Makefile.in under template"
This reverts commits:
* 6f9d5fafe0
* bb3c89b643

And remove the dependency of Makefile on Makefile.in
transitionally.
2019-06-07 09:03:25 +09:00
Nobuyoshi Nakada
6f9d5fafe0
Moved Makefile.in under template 2019-06-07 08:44:37 +09:00
Nobuyoshi Nakada
d046fe9262
configure.ac: utilize wide columns for summary 2019-06-06 12:03:19 +09:00
Nobuyoshi Nakada
65ce14e7b5
Added --with-rdoc option
New option to direct formats of RDoc to install.
2019-05-25 17:20:31 +09:00
Nobuyoshi Nakada
4fae3c3fb0
Show doc list to install
Show document format list to install, not only enabled or disable.
2019-05-25 17:16:07 +09:00
Nobuyoshi Nakada
9a4d39b95e
No longer svn & git-svn are used 2019-05-10 15:22:54 +09:00
Kazuhiro NISHIYAMA
87cf45a512
Fix a typo 2019-04-23 16:50:15 +09:00
nobu
23a8183bea Check stx_btime in struct statx
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-24 11:57:18 +00:00
glass
8b8285e253 configure.ac: remove check for broken memmem
the bug of memmem(3) was fixed in glibc 2.1 released in 1999.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-24 05:27:33 +00:00
glass
dc700cf903 configure.ac: skip check of statx() on AIX
Linux and AIX have statx() with different prototype.

Linux: int statx(int, const char*, int, unsigned int, struct statx*)
AIX: int statx(char, struct stat*, int, int)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-23 04:42:48 +00:00
nobu
15a98ab428 Try statx syscall
* file.c (rb_file_s_birthtime): export for pathname to check if
  birthtime is supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-20 06:54:23 +00:00
glass
88798f0787 file.c: enable File.birthtime on Linux
enable File.birthtime on Linux if statx(2) is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-19 05:44:53 +00:00
glass
1a8583de72 random.c: use getrandom() if available.
getrandom() is supported by glibc 2.25 or later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-10 08:21:33 +00:00