summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in6
-rw-r--r--common.mk5
-rw-r--r--configure.ac3
-rw-r--r--win32/Makefile.sub6
4 files changed, 10 insertions, 10 deletions
diff --git a/Makefile.in b/Makefile.in
index e75cfe54e3..11c772cbc6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -69,6 +69,7 @@ warnflags = @warnflags@ @strict_warnflags@
cppflags = @cppflags@
XCFLAGS = @XCFLAGS@
CPPFLAGS = @CPPFLAGS@ $(INCFLAGS) -DMJIT_HEADER_BUILD_DIR=\""$(EXTOUT)/include/$(arch)"\" -DLIBRUBYARG_SHARED=\""$(LIBRUBYARG_SHARED)"\" -DLIBRUBY_LIBDIR=\""$(prefix)/lib"\" -DMJIT_HEADER_INSTALL_DIR=\""$(prefix)/include/$(RUBY_BASE_NAME)-$(ruby_version)/$(arch)"\"
+MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXTLDFLAGS = @EXTLDFLAGS@
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
@@ -407,11 +408,6 @@ probes.@OBJEXT@: $(srcdir)/probes.d $(DTRACE_REBUILD:yes=probes.stamp)
$(Q) $(RM) $@
$(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS)
-rb_mjit_header.h: PHONY probes.h
- $(ECHO) building $@
- $(Q) $(CC) $(CFLAGS_NO_ARCH) $(XCFLAGS) $(CPPFLAGS) -DMJIT_HEADER $(srcdir)/vm.c $(COUTFLAG) $@.new -E -P -dD
- $(Q) $(IFCHANGE) $@ $@.new
-
# DTrace static library hacks described here:
# http://mail.opensolaris.org/pipermail/dtrace-discuss/2005-August/000207.html
ruby-glommed.$(OBJEXT):
diff --git a/common.mk b/common.mk
index 1511614791..bb07f6b163 100644
--- a/common.mk
+++ b/common.mk
@@ -192,6 +192,11 @@ all: $(SHOWFLAGS) main docs
main: $(SHOWFLAGS) exts $(ENCSTATIC:static=lib)encs $(MJIT_MIN_HEADER)
@$(NULLCMD)
+rb_mjit_header.h: PHONY probes.h
+ $(ECHO) building $@
+ $(Q) $(CPP) $(MJIT_HEADER_FLAGS) $(CFLAGS_NO_ARCH) $(XCFLAGS) $(CPPFLAGS) -DMJIT_HEADER $(srcdir)/vm.c $(COUTFLAG)$@.new
+ $(Q) $(IFCHANGE) $@ $@.new
+
$(MJIT_MIN_HEADER): rb_mjit_header.h $(srcdir)/tool/transform_mjit_header.rb
$(ECHO) building $@
$(BASERUBY) $(srcdir)/tool/transform_mjit_header.rb "$(CC)" rb_mjit_header.h $@
diff --git a/configure.ac b/configure.ac
index 352a8140ca..9df872a845 100644
--- a/configure.ac
+++ b/configure.ac
@@ -533,6 +533,8 @@ AS_IF([test "$GCC" = yes], [
# a mistake of silly C extensions.
RUBY_TRY_CFLAGS(-D_FORTIFY_SOURCE=2, [RUBY_APPEND_OPTION(XCFLAGS, -D_FORTIFY_SOURCE=2)])
+ : ${MJIT_HEADER_FLAGS='-P -dD'}
+
# -fstack-protector
AS_CASE(["$target_os"],
[mingw*], [
@@ -2450,6 +2452,7 @@ LIBEXT=a
AC_SUBST(DLDFLAGS)dnl
AC_SUBST(ARCH_FLAG)dnl
+AC_SUBST(MJIT_HEADER_FLAGS)dnl
AC_SUBST(STATIC)dnl
AC_SUBST(CCDLFLAGS)dnl
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 5986b2c97d..094ce90c78 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -283,6 +283,7 @@ LDSHARED_1 = @if exist $(@).manifest $(MANIFESTTOOL) -manifest $(@).manifest -ou
LDSHARED_2 = @if exist $(@).manifest @$(RM) $(@:/=\).manifest
!endif
CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS) -DMJIT_HEADER_BUILD_DIR=\""$(EXTOUT)/include/$(arch)"\" -DLIBRUBYARG_SHARED=\""$(LIBRUBYARG_SHARED)"\" -DLIBRUBY_LIBDIR=\""$(prefix)/lib"\" -DMJIT_HEADER_INSTALL_DIR=\""$(prefix)/include/$(RUBY_BASE_NAME)-$(ruby_version)/$(arch)"\"
+MJIT_HEADER_FLAGS = -P
DLDFLAGS = $(LDFLAGS) -dll
SOLIBS =
@@ -1192,11 +1193,6 @@ probes.h: {$(VPATH)}probes.dmyh
#include "$(*F).dmyh"
<<KEEP
-rb_mjit_header.h: PHONY probes.h
- $(ECHO) building $@
- $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -DMJIT_HEADER $(srcdir)/vm.c -P
- $(Q) $(IFCHANGE) $@ vm.i
-
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
vmtc.inc vm.inc mjit_compile.inc