Hello again,
I missed cleaning the path correctly when testing this so missed another
needed change. When calling "lipo", the hotspot makefiles should use the
variable supplied by configure. Here is an updated patch.
Webrev: http://cr.openjdk.java.net/~erikj/8087195/webrev.hotspot.01/
/Erik
On 2015-06-11 12:53, Erik Joelsson wrote:
Hello,
Please review this small makefile tweak. When using a devkit to build
hotspot on Macosx, the dtrace command gets confused and tries to use
the wrong preprocessor. I've fixed this by splitting out the running
of the preprocessor to a separate call. I've verified by comparing the
generated header files with and without the patch.
Bug: https://bugs.openjdk.java.net/browse/JDK-8087195
Patch inline:
diff -r 11af3990d56c make/bsd/makefiles/dtrace.make
--- a/make/bsd/makefiles/dtrace.make
+++ b/make/bsd/makefiles/dtrace.make
@@ -263,14 +263,19 @@
$(DtraceOutDir):
mkdir $(DtraceOutDir)
+# When building using a devkit, dtrace cannot find the correct
preprocessor so
+# we run it explicitly before runing dtrace.
$(DtraceOutDir)/hotspot.h: $(DTRACE_COMMON_SRCDIR)/hotspot.d |
$(DtraceOutDir)
- $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s
$(DTRACE_COMMON_SRCDIR)/hotspot.d
+ $(QUIETLY) $(CC) -E $(DTRACE_OPTS) -I. -x c
$(DTRACE_COMMON_SRCDIR)/hotspot.d > $(DtraceOutDir)/hotspot.d
+ $(QUIETLY) $(DTRACE_PROG) -h -o $@ -s $(DtraceOutDir)/hotspot.d
$(DtraceOutDir)/hotspot_jni.h: $(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
| $(DtraceOutDir)
- $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s
$(DTRACE_COMMON_SRCDIR)/hotspot_jni.d
+ $(QUIETLY) $(CC) -E $(DTRACE_OPTS) -I. -x c
$(DTRACE_COMMON_SRCDIR)/hotspot_jni.d > $(DtraceOutDir)/hotspot_jni.d
+ $(QUIETLY) $(DTRACE_PROG) -h -o $@ -s $(DtraceOutDir)/hotspot_jni.d
$(DtraceOutDir)/hs_private.h: $(DTRACE_COMMON_SRCDIR)/hs_private.d |
$(DtraceOutDir)
- $(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -h -o $@ -s
$(DTRACE_COMMON_SRCDIR)/hs_private.d
+ $(QUIETLY) $(CC) -E $(DTRACE_OPTS) -I. -x c
$(DTRACE_COMMON_SRCDIR)/hs_private.d > $(DtraceOutDir)/hs_private.d
+ $(QUIETLY) $(DTRACE_PROG) -h -o $@ -s $(DtraceOutDir)/hs_private.d
dtrace_gen_headers: $(DtraceOutDir)/hotspot.h
$(DtraceOutDir)/hotspot_jni.h $(DtraceOutDir)/hs_private.h
/Erik