ruby-changes:50237
From: k0kubun <ko1@a...>
Date: Sun, 11 Feb 2018 13:20:39 +0900 (JST)
Subject: [ruby-changes:50237] k0kubun:r62355 (trunk): common.mk: define MJIT_HEADER earlier
k0kubun 2018-02-11 13:20:32 +0900 (Sun, 11 Feb 2018) New Revision: 62355 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62355 Log: common.mk: define MJIT_HEADER earlier so that other predefined macros won't be removed by `MJITHeader.remove_predefined_macros!`. Currently macro like -DVM_CHECK_MODE=2 is removed when it's passed in configure. But it is needed during JIT compilation. gc.c: export rb_obj_info to let JIT succeed with VM_CHECK_MODE=2. ``` MJIT warning: failure in loading code from '/tmp/_ruby_mjit_p15631u0.so': /tmp/_ruby_mjit_p15631u0.so: undefined symbol: rb_obj_info ``` Modified files: trunk/common.mk trunk/gc.c Index: common.mk =================================================================== --- common.mk (revision 62354) +++ common.mk (revision 62355) @@ -213,7 +213,7 @@ mjit_config.h: Makefile https://github.com/ruby/ruby/blob/trunk/common.mk#L213 $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJEXT) $(ECHO) building $(@F:.time=.h) - $(Q) $(CPP) $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -DMJIT_HEADER $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new + $(Q) $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new $(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new $(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).h: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time Index: gc.c =================================================================== --- gc.c (revision 62354) +++ gc.c (revision 62355) @@ -9452,7 +9452,7 @@ obj_info(VALUE obj) https://github.com/ruby/ruby/blob/trunk/gc.c#L9452 } #endif -const char * +MJIT_FUNC_EXPORTED const char * rb_obj_info(VALUE obj) { if (!rb_special_const_p(obj)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/