PING 3: [PATCH FOR REVIEW]: Make source/target options explicit for MakeDeps and jvmti
John Coomes
John.Coomes at sun.com
Fri Sep 11 11:42:01 PDT 2009
Andrew John Hughes (gnu_andrew at member.fsf.org) wrote:
> 2009/9/11 John Coomes <John.Coomes at sun.com>:
> > Andrew John Hughes (gnu_andrew at member.fsf.org) wrote:
> >> > ...
> >> > Ok so this sounds like we need to go back to something similar to what
> >> > I started with, and patch each individual platform Makefile. ÃÂ Is that
> >> > correct?
> >>
> >> Here's a revised webrev:
> >>
> >> http://cr.openjdk.java.net/~andrew/ecj/03/webrev.05/hotspot.patch
> >>
> >> using rules.make for each platform instead of the top-level defs.make.
> >> It also includes the replacement of separate SA flags with just adding
> >> the same flags to SA and then following that with -source/target 1.4.
> >> Is this ok?
> >
> > Looks good so far. Â I'm trying some builds.
> >
>
> Ok, the patch you gave below looks ok to me. Are you testing with
> this patched version?
> Let me know if it goes ok, and if it does I'll push the patched version.
I tested both on solaris & linux (all good). I'll also try windows
shortly.
Note that we (hotspot) use an auto-build system called jprt for all
changes; it builds & tests on all platforms and does the push if
everything is clean. If you create a changeset that jcheck will
accept I'll submit it for you to jprt. Include me as a reviewer
(jcoomes).
You can publish the repo or generate a patch w/hg headers using 'hg
export'.
-John
> >> >> Also, in prior email I suggested:
> >> >>
> >> >>> ..., if you update JAVAC_COMPILE to include BOOTSTRAP_JAVAC_FLAGS (or
> >> >>> whatever it is), and the SA makefile also includes -source/-target
> >> >>> options on the command-line, the latter will override the ones in
> >> >>> BOOTSTRAP_JAVAC_FLAGS (the SA command line may need to include both
> >> >>> -source and -target). ÃÂ At least try it, I think it'll be a simpler change.
> >> >>
> >> >
> >> > Ok, I must have missed this. ÃÂ It sounds a good idea and in the long
> >> > term I presume we want to get rid of the SA overrides anyway.
> >
> > That's closer, but not exactly what I was suggesting. Â Here's a patch
> > to apply on top of your patch. Â Basically, it includes
> > BOOTSTRAP_JAVAC_FLAGS in COMPILE.JAVAC (COMPILE_JAVAC on windows).
> >
> > -John
> >
> >
> > # HG changeset patch
> > # User jcoomes
> > # Date 1252627237 25200
> >
> > diff --git a/make/linux/makefiles/jvmti.make b/make/linux/makefiles/jvmti.make
> > --- a/make/linux/makefiles/jvmti.make
> > +++ b/make/linux/makefiles/jvmti.make
> > @@ -70,10 +70,10 @@
> > Â both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
> >
> > Â $(JvmtiGenClass): $(JvmtiGenSource)
> > - Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiGenSource)
> > + Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
> >
> > Â $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
> > - Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> > + Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> >
> > Â $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
> > Â Â Â Â @echo Generating $@
> > diff --git a/make/linux/makefiles/rules.make b/make/linux/makefiles/rules.make
> > --- a/make/linux/makefiles/rules.make
> > +++ b/make/linux/makefiles/rules.make
> > @@ -122,6 +122,8 @@
> > Â endif
> > Â endif
> >
> > +COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
> > +
> > Â SUM = /usr/bin/sum
> >
> > Â # 'gmake MAKE_VERBOSE=y' gives all the gory details.
> > diff --git a/make/linux/makefiles/sa.make b/make/linux/makefiles/sa.make
> > --- a/make/linux/makefiles/sa.make
> > +++ b/make/linux/makefiles/sa.make
> > @@ -74,8 +74,8 @@
> > Â Â Â Â Â mkdir -p $(SA_CLASSDIR); Â Â Â Â \
> > Â Â Â Â fi
> >
> > - Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
> > - Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
> > + Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
> > + Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
> >
> > Â Â Â Â $(QUIETLY) $(REMOTE) $(COMPILE.RMIC) Â -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
> > Â Â Â Â $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
> > diff --git a/make/linux/makefiles/top.make b/make/linux/makefiles/top.make
> > --- a/make/linux/makefiles/top.make
> > +++ b/make/linux/makefiles/top.make
> > @@ -114,7 +114,7 @@
> > Â # make makeDeps: (and zap the cached db files to force a nonincremental run)
> >
> > Â $(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
> > - Â Â Â @$(REMOTE) $(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps $(BOOTSTRAP_JAVAC_FLAGS) -d $(GENERATED) $(MakeDepsSources)
> > + Â Â Â @$(REMOTE) $(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
> > Â Â Â Â @echo Removing $(Incremental_Lists) to force regeneration.
> > Â Â Â Â @rm -f $(Incremental_Lists)
> > Â Â Â Â @$(CDG) echo >$(Cached_plat)
> > diff --git a/make/solaris/makefiles/jvmti.make b/make/solaris/makefiles/jvmti.make
> > --- a/make/solaris/makefiles/jvmti.make
> > +++ b/make/solaris/makefiles/jvmti.make
> > @@ -69,10 +69,10 @@
> > Â both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl
> >
> > Â $(JvmtiGenClass): $(JvmtiGenSource)
> > - Â Â Â $(QUIETLY) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiGenSource)
> > + Â Â Â $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
> >
> > Â $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
> > - Â Â Â $(QUIETLY) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> > + Â Â Â $(QUIETLY) $(COMPILE.JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> >
> > Â $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
> > Â Â Â Â @echo Generating $@
> > diff --git a/make/solaris/makefiles/rules.make b/make/solaris/makefiles/rules.make
> > --- a/make/solaris/makefiles/rules.make
> > +++ b/make/solaris/makefiles/rules.make
> > @@ -122,6 +122,8 @@
> > Â endif
> > Â endif
> >
> > +COMPILE.JAVAC += $(BOOTSTRAP_JAVAC_FLAGS)
> > +
> > Â SUM = /usr/bin/sum
> >
> > Â # 'gmake MAKE_VERBOSE=y' gives all the gory details.
> > diff --git a/make/solaris/makefiles/sa.make b/make/solaris/makefiles/sa.make
> > --- a/make/solaris/makefiles/sa.make
> > +++ b/make/solaris/makefiles/sa.make
> > @@ -67,9 +67,9 @@
> > Â Â Â Â $(QUIETLY) if [ ! -d $(SA_CLASSDIR) ] ; then \
> > Â Â Â Â Â mkdir -p $(SA_CLASSDIR); Â Â Â Â \
> > Â Â Â Â fi
> > - Â Â Â $(QUIETLY) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
> > - Â Â Â $(QUIETLY) $(COMPILE.JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
> > -
> > + Â Â Â $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1)
> > + Â Â Â $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2)
> > +
> > Â Â Â Â $(QUIETLY) $(COMPILE.RMIC) Â -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
> > Â Â Â Â $(QUIETLY) echo "$(SA_BUILD_VERSION_PROP)" > $(SA_PROPERTIES)
> > Â Â Â Â $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
> > diff --git a/make/solaris/makefiles/top.make b/make/solaris/makefiles/top.make
> > --- a/make/solaris/makefiles/top.make
> > +++ b/make/solaris/makefiles/top.make
> > @@ -112,7 +112,7 @@
> > Â # make makeDeps: (and zap the cached db files to force a nonincremental run)
> >
> > Â $(GENERATED)/$(MakeDepsClass): $(MakeDepsSources)
> > - Â Â Â @$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps $(BOOTSTRAP_JAVAC_FLAGS) -d $(GENERATED) $(MakeDepsSources)
> > + Â Â Â @$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -d $(GENERATED) $(MakeDepsSources)
> > Â Â Â Â @echo Removing $(Incremental_Lists) to force regeneration.
> > Â Â Â Â @rm -f $(Incremental_Lists)
> > Â Â Â Â @$(CDG) echo >$(Cached_plat)
> > diff --git a/make/windows/makefiles/generated.make b/make/windows/makefiles/generated.make
> > --- a/make/windows/makefiles/generated.make
> > +++ b/make/windows/makefiles/generated.make
> > @@ -91,7 +91,7 @@
> > Â classes/MakeDeps.class: $(MakeDepsSources)
> > Â Â Â Â if exist classes rmdir /s /q classes
> > Â Â Â Â mkdir classes
> > - Â Â Â $(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\MakeDeps $(BOOTSTRAP_JAVAC_FLAGS) -d classes $(MakeDepsSources)
> > + Â Â Â $(COMPILE_JAVAC) -classpath $(WorkSpace)\src\share\tools\MakeDeps -d classes $(MakeDepsSources)
> >
> > Â !if ("$(Variant)" == "compiler2") || ("$(Variant)" == "tiered")
> >
> > diff --git a/make/windows/makefiles/jvmti.make b/make/windows/makefiles/jvmti.make
> > --- a/make/windows/makefiles/jvmti.make
> > +++ b/make/windows/makefiles/jvmti.make
> > @@ -68,10 +68,10 @@
> > Â Â Â Â @if not exist $(JvmtiOutDir) mkdir $(JvmtiOutDir)
> >
> > Â $(JvmtiGenClass): $(JvmtiGenSource)
> > - Â Â Â $(COMPILE_JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiGenSource)
> > + Â Â Â $(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiGenSource)
> >
> > Â $(JvmtiEnvFillClass): $(JvmtiEnvFillSource)
> > - Â Â Â @$(COMPILE_JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> > + Â Â Â @$(COMPILE_JAVAC) -d $(JvmtiOutDir) $(JvmtiEnvFillSource)
> >
> > Â $(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl
> > Â Â Â Â @echo Generating $@
> > diff --git a/make/windows/makefiles/rules.make b/make/windows/makefiles/rules.make
> > --- a/make/windows/makefiles/rules.make
> > +++ b/make/windows/makefiles/rules.make
> > @@ -29,7 +29,7 @@
> > Â RUN_JAVAP=$(BootStrapDir)\bin\javap
> > Â RUN_JAVAH=$(BootStrapDir)\bin\javah
> > Â RUN_JAR=$(BootStrapDir)\bin\jar
> > -COMPILE_JAVAC=$(BootStrapDir)\bin\javac
> > +COMPILE_JAVAC=$(BootStrapDir)\bin\javac $(BOOTSTRAP_JAVAC_FLAGS)
> > Â COMPILE_RMIC=$(BootStrapDir)\bin\rmic
> > Â BOOT_JAVA_HOME=$(BootStrapDir)
> > Â !else
> > @@ -37,7 +37,7 @@
> > Â RUN_JAVAP=javap
> > Â RUN_JAVAH=javah
> > Â RUN_JAR=jar
> > -COMPILE_JAVAC=javac
> > +COMPILE_JAVAC=javac $(BOOTSTRAP_JAVAC_FLAGS)
> > Â COMPILE_RMIC=rmic
> > Â BOOT_JAVA_HOME=
> > Â !endif
> > diff --git a/make/windows/makefiles/sa.make b/make/windows/makefiles/sa.make
> > --- a/make/windows/makefiles/sa.make
> > +++ b/make/windows/makefiles/sa.make
> > @@ -55,9 +55,9 @@
> > Â $(GENERATED)\sa-jdi.jar: $(AGENT_FILES1:/=\) $(AGENT_FILES2:/=\)
> > Â Â Â Â @if not exist $(SA_CLASSDIR) mkdir $(SA_CLASSDIR)
> > Â Â Â Â @echo ...Building sa-jdi.jar
> > - Â Â Â @echo ...$(COMPILE_JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) ....
> > - Â Â Â @$(COMPILE_JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\)
> > - Â Â Â @$(COMPILE_JAVAC) $(BOOTSTRAP_JAVAC_FLAGS) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\)
> > + Â Â Â @echo ...$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -d $(SA_CLASSDIR) ....
> > + Â Â Â @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES1:/=\)
> > + Â Â Â @$(COMPILE_JAVAC) -source 1.4 -target 1.4 -classpath $(SA_CLASSPATH) -sourcepath $(AGENT_SRC_DIR) -d $(SA_CLASSDIR) $(AGENT_FILES2:/=\)
> > Â Â Â Â $(COMPILE_RMIC) -classpath $(SA_CLASSDIR) -d $(SA_CLASSDIR) sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer
> > Â Â Â Â $(QUIETLY) echo $(SA_BUILD_VERSION_PROP)> $(SA_PROPERTIES)
> > Â Â Â Â $(QUIETLY) rm -f $(SA_CLASSDIR)/sun/jvm/hotspot/utilities/soql/sa.js
> > diff --git a/make/windows/projectfiles/common/Makefile b/make/windows/projectfiles/common/Makefile
> > --- a/make/windows/projectfiles/common/Makefile
> > +++ b/make/windows/projectfiles/common/Makefile
> > @@ -179,6 +179,6 @@
> > Â $(HOTSPOTBUILDSPACE)/classes/MakeDeps.class: $(MakeDepsSources)
> > Â Â Â Â @if exist $(HOTSPOTBUILDSPACE)\classes rmdir /s /q $(HOTSPOTBUILDSPACE)\classes
> > Â Â Â Â @mkdir $(HOTSPOTBUILDSPACE)\classes
> > - Â Â Â @$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\MakeDeps $(BOOTSTRAP_JAVAC_FLAGS) -d $(HOTSPOTBUILDSPACE)/classes $(MakeDepsSources)
> > + Â Â Â @$(COMPILE_JAVAC) -classpath $(HOTSPOTWORKSPACE)\src\share\tools\MakeDeps -d $(HOTSPOTBUILDSPACE)/classes $(MakeDepsSources)
> >
> > Â FORCE:
> >
> >
>
>
>
> --
> Andrew :-)
>
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
>
> Support Free Java!
> Contribute to GNU Classpath and the OpenJDK
> http://www.gnu.org/software/classpath
> http://openjdk.java.net
>
> PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
> Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the hotspot-dev
mailing list