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

151 Коммитов

Автор SHA1 Сообщение Дата
ko1 3e1f06da5d fix C90 error.
* configure.ac (check broken_backtrace code): fix decl. position
  error because of `-Werror=declaration-after-statement`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-05 16:15:09 +00:00
odaira d612c44dad Enable MJIT on AIX
* configure.ac: disable using __builtin_setjmp to avoid errors when execution
  globally jumps out of JITted code. Specify -std=gnu99 to JIT compilation
  to avoid errors regarding the "restrict" keyword in the precompiled header.
  Specify -shared in addition to -Wl,-G when building shared libraries
  to make mjit_build_dir.so expose the MJIT_BUILD_DIR symbol.  Use LDR_PRELOAD
  to load mjit_build_dir.so.

* mjit_worker.c: do not specify -nodefaultlibs or -nostdlibs because on AIX
  JITted code internally refers to the memcpy function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 22:19:09 +00:00
ko1 66e9bfd4be use __builtin_setjmp on mingw64 [Bug #15348].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-29 06:37:01 +00:00
shyouhei 0b899a25f5 Remove HEAP_ALIGN_LOG setting in configure.ac for OpenBSD/MirOS
The ruby setting was renamed to HEAP_PAGE_ALIGN_LOG, but the
configure.in (now configure.ac) file was not updated, so the
setting had no effect.  The configure setting is unnecessary
after OpenBSD 5.2 and MirOS has been discontinued (with the last
release being over 10 years ago), so it is better to just remove
the related configure setting.

Fix [Bug #13438]
From: Jeremy Evans <code@jeremyevans.net>



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-29 06:16:31 +00:00
samuel 4b0a256e9b Enable msys2 to check build status.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-24 02:31:06 +00:00
normal b009de13bf configure.ac: support 32-bit builds on x86-64 systems
Because RAM is still expensive :<

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-22 08:46:44 +00:00
odaira e7d919d265 * configure.ac: On AIX, LDFLAGS must be after -L../.. in TRY_LINK,
not to refer to a system-installed libruby-static.a
  when configuring the ext libraries

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 22:44:24 +00:00
nobu e0cd7d65e9 configure.ac: silence `command -v` outpout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 09:11:06 +00:00
nobu f1ed4b713b configure.ac: add --disable-fiber-coroutine option
* configure.ac: add --disable-fiber-coroutine option, and disable
  it on x86-mingw32 for now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 03:26:59 +00:00
nobu 9cda5bba1b configure.ac: gather preset variables on mingw
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21 03:26:58 +00:00
k0kubun c6d0892fa2 configure.ac: disable native-fiber for MinGW
because it had already been SEGV-ed in pull request'S CI
https://ci.appveyor.com/project/ruby/ruby/builds/20427065/job/32oahrcd58b8ubb1
and has never worked on trunk either.

Please make sure it does not SEGVs on your MinGW environment or pull
request before enabling native fiber on MinGW.

appveyor.yml: reverted commits to make CI green with native fiber
test/excludes/_appveyor/msys2/TestArray.rb: ditto
test/excludes/_appveyor/msys2/TestEnumerable.rb: ditto
test/excludes/_appveyor/vs/TestArray.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 14:40:55 +00:00
samuel 972cc2d50b Fix message result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:56 +00:00
samuel 76c6b6d14b Fix configure.ac typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:52 +00:00
samuel 0b5e1442f5 Initial support for x64-mingw32
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:44 +00:00
samuel 904af4aef2 Be even more specific, for some reason it was selecting amd64 on x64-mingw32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:35 +00:00
samuel 43d7fd0946 Limit coroutine implementations to Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:31 +00:00
samuel a2cd16e58e Expose dependency between cont.c and coroutine implementation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:17:24 +00:00
samuel 3e9beaf72b Initial effort to support 32-bit Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 10:13:59 +00:00
samuel 990ddcfccf Better support for amd64 platforms
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 09:59:14 +00:00
samuel 07a324a0f6 Native implementation of coroutines to improve performance of fibers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 09:59:10 +00:00
nobu d7d0ee1065 Check -fcf-protection
* configure.ac: Check if CFLAGS actually includes -fcf-protection
  instead of checking if the flag is valid by RUBY_TRY_CFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 00:39:07 +00:00
k0kubun 00fac76efa configure.ac: avoid crashing MJIT with -fcf-protection
by avoiding using __builtin_longjmp, like r64983.

[Bug #15307]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 23:05:11 +00:00
k0kubun b756b25c60 ruby.c: do not surface MJIT to user
In some places, both JIT and MJIT are being used, but it could be
confusing for new comers. We're not explaining MJIT on NEWS file or release
notes as well. So we consider MJIT as an internal term of implementation
like YARV.

configure.ac: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 14:00:49 +00:00
nobu 759cfd3bcb configure.ac: rename extra_warning as extra_warnflags
Adjusted to warnflags variable.  This variable will have flags for
warnings, but not a warning itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 13:21:48 +00:00
nobu 33fed2d09a configure.ac: respect extra_warnflags if given
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 10:15:20 +00:00
shyouhei e0dba0780c -Wno-unused-value [ci skip]
Without this option clang outputs tons of warnings, which
are annoying. See https://travis-ci.org/ruby/ruby/jobs/456553420#L1817


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 03:01:55 +00:00
shyouhei 45a89c0a0d sort lines [ci skip]
... for aethetic reasons.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 02:58:51 +00:00
kazu 51902ea5c9 Remove unused default value of MJIT_CC [ci skip]
because always set `MJIT_CC` at `: ${MJIT_CC=$CC}`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-09 13:00:03 +00:00
nobu 9b7d8947df Clear CC_WRAPPER in other than the toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 16:51:19 +00:00
nobu 61eaa5e3f2 Convert MJIT_CC to Windows path on msys too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 14:27:27 +00:00
shyouhei 3f6a4be3a4 vm_backtrace.c: pos can be zero
(lldb) target create "./miniruby"
Current executable set to './miniruby' (x86_64).
(lldb) settings set -- target.run-args  "-e0"
(lldb) run
Process 97005 launched: './miniruby' (x86_64)
./miniruby(rb_print_backtrace+0x15) [0x10024f7d5] vm_dump.c:715
./miniruby(rb_vm_get_sourceline+0x85) [0x10024c4f5] vm_backtrace.c:43
./miniruby(rb_vm_make_binding+0x146) [0x100236976] vm.c:941
./miniruby(Init_VM+0x592) [0x100249f02] vm.c:3091
./miniruby(rb_call_inits+0xc2) [0x1000c5a72] inits.c:58
./miniruby(ruby_setup+0xcb) [0x100098c6b] eval.c:74
./miniruby(ruby_init+0x9) [0x100098c99] eval.c:91
./miniruby(main+0x4d) [0x10025ddbd] addr2line.c:246
Process 97005 stopped
* thread #1: tid = 0x639bb, 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x000000010024c4f5 miniruby`rb_vm_get_sourceline(cfp=<unavailable>) + 133 at vm_backtrace.c:44
   41       else {
   42           /* SDR() is not possible; that causes infinite loop. */
   43           rb_print_backtrace();
-> 44           __builtin_trap();
   45       }
   46   #endif
   47       return rb_iseq_line_no(iseq, pos);
(lldb)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07 08:04:33 +00:00
nobu 92e9f61579 Fix build_os:host_os pair
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 23:50:50 +00:00
nobu 78bf275c56 Expand MJIT_CC in configure
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 12:08:54 +00:00
shyouhei 4a80c0540f adopt sanitizer API
These APIs are much like <valgrind/memcheck.h>. Use them to
fine-grain annotate the usage of our memory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 10:06:07 +00:00
nobu 67de434219 configure.ac: insert DLDSHARED
* configure.ac (DLDSHARED): `.dylib` (created by `-dynamiclib`)
  and `.bundle` (created by `-dynamic -bundle`) on macOS are
  different.  `LIBRUBY_LDSHARED` should be the former always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 03:32:57 +00:00
shyouhei 16f5b18b7a gc.c: move ASAN check to configure
Availability of attributes are checked in configure these days,
rather than compiler macros.  Also
__attribute__((no_address_safety_analysis)) is considered
deprecated in both GCC and Clang.  Use the current best practice
if available.  See also:

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
https://clang.llvm.org/docs/AddressSanitizer.html


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-06 02:57:28 +00:00
nobu fc8bda6ff7 Respect explicitly given MJIT_CC
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-05 02:57:06 +00:00
nobu c111c42ba2 MJIT_CC should not use CC_WRAPPER
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-04 12:24:03 +00:00
nobu 7d9623eb24 Makefile.in: use CC_WRAPPER
* Makefile.in (CC_WRAPPER): use the wrapper to suppress warnings
  by Apple's broken packages when linking in the toplevel
  directory.

* configure.ac (CC_WRAPPER): separate from CC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-03 23:43:17 +00:00
nobu 0f28fe2bcd configure.ac: set CC_WRAPPER by checking message
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-03 23:10:57 +00:00
ko1 0b19e15a12 rename configure option `--disable-mjit` to `--disable-mjit-support`
* configure.ac: rename configure option `--disable-mjit` to
  `--disable-mjit-support` because `--disable-mjit` is ambiguous that
  runtime MJIT default enable option or supporting MJIT features.
  `ENABLE_MJIT` is also renamed to `MJIT_SUPPORT`

* Makefile.in: catch up this fix.

* common.mk: ditto.

* test/ruby/test_jit.rb: ditto.

* win32/Makefile.sub: catch up this fix on mswin.

* tool/mkconfig.rb: fix to pass `MJIT_SUPPORT` key.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 08:00:42 +00:00
ko1 b710785f1a add disabling MJIT features option.
* configure.ac: introduce new configure option `--enable-mjit` and
  `--disable-mjit`. Default is "enable".
  `--disable-mjit` disables all of MJIT features so that `ruby --jit`
  can't enable MJIT.
  This option affect a macro `USE_MJIT`.
  This change remove `--enable/disable-install-mjit-header` option.

* Makefile.in: introduce the `ENABLE_MJIT` variable.

* common.mk: use `ENABLE_MJIT` option.

* internal.h: respect `USE_MJIT`. Same as other *.c, *.h.

* test/ruby/test_jit.rb: check `ENABLE_MJIT` key of rbconfg.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 06:53:00 +00:00
naruse 595056135f Support Mach-O on backtrace with DWARF
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20 06:35:25 +00:00
k0kubun 6e11415b9c configure.ac: add --disable-install-mjit-header
and substitute INSTALL_MJIT_HEADER. This would be convenient as a workaround
for user if we found a platform that can't compile Ruby after Ruby 2.6.0 release.

common.mk: Install MJIT header only when INSTALL_MJIT_HEADER
Makefile.in: ditto
win32/Makefile.sub: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19 12:31:02 +00:00
shyouhei 88a7271de4 configure.ac: do not overwrite -std=
Set -std=gnu99 only when no such compiler flag(s) are set in any
compiler-related environment variables.  This enables users to
specify something more modern, say, -std=c11.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-18 09:21:05 +00:00
shyouhei 9ab13f3837 detect clang++
Given $CC is clang-* in this case branch the sed should
match against clang, not gcc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-15 04:05:32 +00:00
nobu 9067330c6d Pass cflags given to configure to mjit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-15 00:11:45 +00:00
nobu f2427a436f Define PRIdPTR etc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13 16:21:07 +00:00
odaira 67fcbf9328 * configure.ac: do not use __builtin_longjmp on ppc64* Linux
because it causes a segmentation fault with MJIT

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-09 20:06:36 +00:00
nobu b68f2a4bba Use cd -P
Setting PWD in the process does not let `cd` traverse symlinks in
/bin/sh on macOS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-03 06:48:35 +00:00