Regression in OpenJDK8 Makefiles
Dr Andrew John Hughes
ahughes at redhat.com
Wed Jul 27 23:28:54 UTC 2011
On 11:58 Wed 27 Jul , Kelly O'Hair wrote:
> On Jul 27, 2011, at 11:04 AM, Dr Andrew John Hughes wrote:
> > Hi,
> > Can someone please tell me why:
> > http://hg.openjdk.java.net/jdk8/tl/jdk/rev/cf4edfcd7119
> > reverted my earlier fix:
> > http://hg.openjdk.java.net/jdk8/tl/jdk/rev/80368890a2a0
> > without any discussion?
> My apologies, the webrev should have been made public.
> > The correct fix would have been to bump the boot source language/target class
> > versions to 7, not erase the lines altogether.
> Unfortunately, that did not work with jdk7 as a boot
Why was this? I don't understand why anything would fail with javac -source 7 -target 7 over
, and jdk6 won't work as a boot jdk
> soon anyway.
Well, yes I assumed this patch was related to moving to OpenJDK7 as the minimum bootstrap JDK.
> Since we will be requiring a jdk7 as the boot jdk, I did not feel it was needed
> to even specify this. Anything compiled with the boot javac technically doesn't care what
> the source/target is, or should, and the class files created just need to work with the boot jdk,
> and should not be shipped as part of the jdk8 being built.
> When I looked at the Makefiles, there was no comment as to why we even had to set the -source
> or -target options when using the boot javac at all.
> My conclusion was that it was unnecessary, and deleting these lines made 'jdk7 as boot' work.
> If that was wrong I apologize, why does this matter?
It means that we are depending on whatever defaults the bootstrap
javac uses rather than being explicit. In most cases, that might not
cause a problem but I know I've run into problems with this and I
think it better to be safe than sorry, as you don't know what the
bootstrap javac is or what its default is. If we expect the
bootstrap javac to produce java 7 class files, it should be set
I think I've hit it mostly with using ecj as the bootstrap javac, but
it couldcause an issue during development if the bootstrap javac
started producing 1.8 code by default but the VM used wasn't capable of
handling it. Unlikely maybe, but I think it's better to have this set
explicitly and just avoid such issues altogether.
> > --
> > Andrew :)
> > Free Java Software Engineer
> > Red Hat, Inc. (http://www.redhat.com)
> > Support Free Java!
> > Contribute to GNU Classpath and IcedTea
> > http://www.gnu.org/software/classpath
> > http://icedtea.classpath.org
> > PGP Key: F5862A37 (https://keys.indymedia.org/)
> > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
More information about the core-libs-dev