Skip to content

Instantly share code, notes, and snippets.

@fd00 fd00/mjit.log
Created Jun 14, 2018

Embed
What would you like to do?
win10vbox :: ruby-2.6.0-preview2-1.x86_64/build » LIBRARY_PATH=${LD_LIBRARY_PATH}:${PWD} ./ruby.exe --jit --jit-verbose=2 -I../src/ruby-2.6.0-preview2/lib -I. -I.ext/x86_64-cygwin /cygdrive/e/work/test.rb
MJIT: CC defaults to gcc
MJIT: tmp_dir is /cygdrive/c/Users/boole/AppData/Local/Temp
Creating precompiled header
Starting process: gcc gcc -w -Wfatal-errors -fPIC -shared -w -pipe -O3 -o /cygdrive/c/Users/boole/AppData/Local/Temp/_ruby_mjit_hp5804u0.h.gch /tmp/ruby/ruby-2.6.0-preview2-1.x86_64/build/include/x86_64-cygwin/ruby-2.6.0/rb_mjit_min_header-2.6.0.h
start compile: block in func@/cygdrive/e/work/test.rb:6 -> /cygdrive/c/Users/boole/AppData/Local/Temp/_ruby_mjit_p5804u28.c
Starting process: gcc gcc -shared -Wfatal-errors -fPIC -shared -w -pipe -O3 -o /cygdrive/c/Users/boole/AppData/Local/Temp/_ruby_mjit_p5804u28.so /cygdrive/c/Users/boole/AppData/Local/Temp/_ruby_mjit_p5804u28.c -lruby260 -lgcc -Wl,--export-all-symbols -Wl,--enable-auto-image-base,--enable-auto-import -nostartfiles
2.719000 0.000000 3.060000 ( 3.873230)
Canceling pch and worker threads
JIT success (3510.5ms): block in func@/cygdrive/e/work/test.rb:6 -> /cygdrive/c/Users/boole/AppData/Local/Temp/_ruby_mjit_p5804u28.c
Successful MJIT finish
win10vbox :: ruby-2.6.0-preview2-1.x86_64/build »
--- origsrc/ruby-2.6.0-preview2/mjit.c 2018-05-24 15:15:43.000000000 +0900
+++ src/ruby-2.6.0-preview2/mjit.c 2018-06-04 10:26:11.829690500 +0900
@@ -593,7 +593,7 @@ static const char *const CC_DLDFLAGS_ARG
MJIT_DLDFLAGS
#if defined __GNUC__ && !defined __clang__
"-nostartfiles",
-# ifndef _WIN32
+# if !defined(_WIN32) && !defined(__CYGWIN__)
"-nodefaultlibs", "-nostdlib",
# endif
#endif
@@ -601,10 +601,12 @@ static const char *const CC_DLDFLAGS_ARG
};
static const char *const CC_LIBS[] = {
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
MJIT_LIBS
# if defined __GNUC__ && !defined __clang__
+# if defined(_WIN32)
"-lmsvcrt",
+# endif
"-lgcc",
# endif
#endif
--- origsrc/ruby-2.6.0-preview2/thread_pthread.c 2018-05-24 11:52:46.000000000 +0900
+++ src/ruby-2.6.0-preview2/thread_pthread.c 2018-06-04 10:05:32.211487000 +0900
@@ -1756,7 +1756,9 @@ rb_thread_create_mjit_thread(void (*chil
/* jit_worker thread is not to be joined */
if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0
+#if defined(__LINUX__)
&& pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0
+#endif
&& pthread_create(&worker_pid, &attr, mjit_worker, (void *)worker_func) == 0) {
ret = TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.