Граф коммитов

201 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 74f94b3e6e configure.ac: check finite,isinf,isnan as macros first
[ruby-core:91487] [Bug #15595]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08 07:22:55 +00:00
nobu cc7dedfb4d configure.ac: separate -std=gnu99 condition
Also necessary on mingw, cygwin, darwin and netbsd.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-04 08:17:44 +00:00
glass 2210709b79 io.c: use fcopyfile(3) in IO.copy_stream if available
fixed r66930.

* io.c (nogvl_copy_stream_func): use fcopyfile(3) in IO.copy_stream if available

* configure.ac: check copyfile.h and fcopyfile(3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-28 05:04:17 +00:00
glass 774c60955a Revert "io.c: use fcopyfile(3) in IO.copy_stream if available"
This reverts commit bd670062c4.
It fails on rubyspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-27 21:46:06 +00:00
glass bd670062c4 io.c: use fcopyfile(3) in IO.copy_stream if available
* io.c (nogvl_copy_stream_func): use fcopyfile(3) in IO.copy_stream if available

* configure.ac: check copyfile.h and fcopyfile(3)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-27 20:55:26 +00:00
nobu bac705529d fix typo in r66836, missing '/'s
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-22 01:56:26 +00:00
glass 12afc11fcd * io.c: use copy_file_range() if defined
* configure.ac: check copy_file_range()

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-21 10:11:04 +00:00
nobu c4e832bf6f configure.ac: fix build_os name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 06:13:10 +00:00
nobu 3859b77be1 configure.ac: use MINIRUBY as BOOTSTRAPRUBY on msys
Msys shell may not be able to run a command with a drive letter?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 05:14:59 +00:00
nobu 3c55a0b942 configure.ac: use BASERUBY as BOOTSTRAPRUBY if available
MINIRUBY may not be stable enough to run btest, in developing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-18 01:55:25 +00:00
nobu 74477ec2b3 Strip warnflags
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 02:09:48 +00:00
nobu 923d03e10c Fixed a typo, missing `$`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-16 00:48:42 +00:00
nobu bb44d9ecf0 configure: refuse to build with jemalloc when header is missing
[ruby-core:90964] [Bug #15520]

Freom: Misty De Meo <mistydemeo@github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 14:44:11 +00:00
k0kubun ec336fb40e configure.ac: Require C99
We already added AC_PROG_CC_C99 in r66605.
This commit stops warning C99 features.

[Misc #15347] [close https://github.com/ruby/ruby/pull/2064]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-01-10 08:04:35 +00:00
k0kubun 61885c9b7c configure.ac: try to fix addr2line build failure
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20181228T063002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20181228T081706Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20181228T063002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos6/ruby-trunk/log/20181228T063003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20181228T080003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/log/20181228T080002Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel_zlinux/ruby-trunk/log/20181228T063303Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20181228T090003Z.fail.html.gz

I suspect r66598 triggered something.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 09:23:27 +00:00
ko1 da8830e3de fix r66599 to sucess install. please refix this patch @nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 03:09:29 +00:00
nobu 8422725408 Moved version numbers
* Define major and minor version numbers only in the public
  include/ruby/version.h header, as the API version numbers.

* Define only teeny version number in the private version.h
  header.

* RUBY_VERSION moved to version.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 02:12:34 +00:00
nobu 1095705c42 Check if restrict keyword is supported
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-28 01:56:20 +00:00
odaira 3a5cc345f8 Native coroutine implementation for ppc64le Linux
* configure.ac: enable fiber coroutine for powerpc64le-linux

* coroutine/ppc64le/Context.S: coroutine_transfer implementation

* coroutine/ppc64le/Context.h: coroutine implementation

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 23:22:56 +00:00
naruse 2f18a95c4e fix r66311
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 15:48:45 +00:00
naruse 7405bbda27 Define HAVE_STMT_AND_DECL_IN_EXPR and use it [Bug #15293]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10 13:58:36 +00:00