Issue #14440 has been updated by k0kubun (Takashi Kokubun).


Whether is the ruby compiled from gcc or clang? A known issue is that using MJIT header generated from different compiler may not work. So I may drop selecting cc in the future.

If the ruby is built from the old gcc and broken with --jit-cc=gcc, we need to fix it.

----------------------------------------
Bug #14440: --jit does not work by default on OpenBSD due to use of gcc instead of clang
https://bugs.ruby-lang.org/issues/14440#change-70164

* Author: jeremyevans0 (Jeremy Evans)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.6.0dev (2018-02-05 trunk 62211) [x86_64-openbsd]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
On OpenBSD, when using just `--jit`, ruby issues a warning message to `$stderr`:

~~~
$ ruby --jit -e 'p 1'                
.ext/include/x86_64-openbsd/rb_mjit_min_header-2.6.0.h:2924: error: wrong number of arguments specified for '__deprecated__' attribute
compilation terminated due to -Wfatal-errors.
1
~~~

This is probably because MJIT doesn't work on old versions of GCC:

~~~
$ gcc -v
Reading specs from /usr/lib/gcc-lib/amd64-unknown-openbsd6.2/4.2.1/specs
Target: amd64-unknown-openbsd6.2
Configured with: OpenBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719
~~~

When using `--jit --jit-cc=clang`, there are no problems:

~~~
$ ruby --jit --jit-cc=clang -e 'p 1'
1
~~~

Either `--jit` should be made to work with older GCC versions, or older GCC versions should be skipped.  It seems like for now, skipping older GCC versions would be easier. 



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>