On 2015-06-12 08:35, Erik Joelsson wrote:
Hello David,

On 2015-06-12 04:20, David Holmes wrote:
Hi Erik,

On 11/06/2015 11:11 PM, Erik Joelsson wrote:
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/

Typo: + # we run it explicitly before runing dtrace.

runing -> running

Fixing that.

Looks good to me then.

/Magnus

Looks okay, only question I have is whether the preprocessed .d files should be placed into DtraceOutDir or some tmp location? I'm not sure where the contents of DtraceOutDir end up.

It's defined as
DtraceOutDir = $(GENERATED)/dtracefiles

which I assume is added to -I for the compiler later. I would say that it's safe to have a couple of other files end up in the same directory.

Thanks
/Erik
Thanks,
David

/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



Reply via email to