Different javac options for explicitly and automatically compiled files

Dr Andrew John Hughes ahughes at redhat.com
Wed Aug 3 05:48:57 UTC 2011


On 16:02 Mon 01 Aug     , Jonathan Gibbons wrote:
> On 08/01/2011 02:55 PM, Dr Andrew John Hughes wrote:
> > On 11:07 Mon 01 Aug     , Alexandre Boulgakov wrote:
> >> Hello Kelly,
> >>
> >> Do you know the answer to this one?
> >>
> >> Thanks,
> >> Sasha
> >>
> >> On 7/29/2011 11:37 AM, Alexandre Boulgakov wrote:
> >>> Hello,
> >>>
> >>> I am working on removing the javac -Xlint warnings from java.net.*.
> >>> After removing these warnings, I would like to turn on javac's -Werror
> >>> flag in make/java/net/Makefile. However, it seems that the javac task
> >>> in make/java/net/Makefile has to automatically compile some
> >>> dependencies (not listed in the makefile, presumably inferred by the
> >>> compiler from the sourcepath) which have not had warnings fixed yet
> >>> (sun.net.idn.*, com.sun.security.ntlm.*).
> >>>
> >>> Is there some way to have the -Werror flag only apply to explicitly
> >>> specified source files, but not to the ones that javac pulls in
> >>> automatically?
> > It sounds to me like there's a bug there; those files should be being
> > dealt with earlier in the build or as part of java/net/Makefile.
> 
> Regrettably, there are circularities in JDK :-(
> 
> > If they aren't implictly compiled from the source tree, then presumably
> > classes from the bootstrap runtime library will be used if present, which
> > could cause all sorts of issues.
> 
> No. The Makefiles should be set so that the "bootstrap runtime library" 
> is overridden
> with -bootclasspath, meaning that the compilation will fail if the 
> classes are not
> available to javac in source or compiled form.
> 

Then where is it going to get these classes if -implicit:none is used to
stop them being compiled from source?

> >>> Thanks,
> >>> Sasha
> 

-- 
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



More information about the build-dev mailing list