On 13/02/2008, Andrew John Hughes <[EMAIL PROTECTED]> wrote:
> On 13/02/2008, Mark Wielaard <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > On Tue, 2008-02-12 at 21:32 +0000, Andrew John Hughes wrote:
> > > On 11/02/2008, Dalibor Topic <[EMAIL PROTECTED]> wrote:
> > > > Andrew John Hughes wrote:
> > > > > This patch makes Classpath use the AC_PROG_JAVAC macros
> > > > > from the autoconf archive, as Kaffe now does (see Dalibor's
> > > > > recent patches).  Instead of detecting both ecj and javac,
> > > > > the build will now test for ecj, javac and gcj in that order,
> > > > > and use the first one.  It tests the chosen compiler for 1.5
> > > > > compatibility (a local extension) and we also retain the -J
> > > > > test.  You can override the choice with JAVAC=<compiler of choice>
> > > > > and add options with JAVACFLAGS=<flags of choice>.
> > > > >
> > > > > ChangeLog:
> > > > >
> > > > > 2008-02-10  Andrew John Hughes  <[EMAIL PROTECTED]>
> > > > >
> > > > >       * NEWS: Mention javah and javac build changes.
> > > > >       * configure.ac: Call AC_PROG_JAVAC and
> > > > >       CLASSPATH_JAVAC_MEM_CHECK instead of CLASSPATH_FIND_JAVAC.
> > > > >       * examples/Makefile.am: Simplify compiler choice
> > > > >       to just use JAVAC.
> > > > >       * lib/Makefile.am: Likewise, but with JAVAC_MEM_OPT too.
> > > > >       * m4/ac_prog_javac.m4: New file.
> > > > >       * m4/ac_prog_javac_works.m4: Likewise.
> > > > >       * m4/acinclude.m4:
> > > > >       (CLASSPATH_FIND_JAVAC): Removed.
> > > > >       (CLASSPATH_WITH_GCJ): Removed.
> > > > >       (CLASSPATH_CHECK_GCJ): Removed.
> > > > >       (CLASSPATH_WITH_JIKES): Removed.
> > > > >       (CLASSPATH_CHECK_JIKES): Removed.
> > > > >       (CLASSPATH_WITH_KJC): Removed.
> > > > >       (CLASSPATH_CHECK_KJC): Removed.
> > > > >       (CLASSPATH_WITH_ECJ): Removed.
> > > > >       (CLASSPATH_CHECK_ECJ): Removed.
> > > > >       (CLASSPATH_WITH_JAVAC): Removed.
> > > > >       (CLASSPATH_CHECK_JAVAC): Removed.
> > > > >       (CLASSPATH_JAVAC_MEM_CHECK): Added.
> > > > >       * tools/Makefile.am: Simplify compiler choice
> > > > >       to just javac.
> > > >
> > > > Very cool. This should allow us to move to use straight automake java
> > > > support at least for the examples, and tools, rather than using our own
> > > > manual compiler flag assembly, source file listing and CVS directory
> > > > purging scripts. Oh, and to rewrite the 1.5 checks in terms of
> > > > AC_JAVAC_TRY_COMPILE. ;)
> > >
> > > As there was no more feedback, I'm going to check this in.
> >
> > I am afraid this did break the auto-builder (from config.log):
> >
> > configure:29347: checking for ecj
> > configure:29363: found /usr/bin/ecj
> > configure:29374: result: ecj
> > configure:29434: checking if ecj works
> > configure:29450: ecj  -source 1.5 -target 1.5 Colour.java
> > ----------
> > 1. ERROR in Colour.java (at line 1)
> >         /* #line 29443 "configure" */
> >         ^
> > The type java.lang.Object cannot be resolved. It is indirectly
> > referenced from required .class files
> > ----------
> > 1 problem (1 error)configure:29453: $? = 255
> >
> >
> >
> >
>
> This is a problem with the ecj on there -- note the discussion we had
> before about rt.jar not being in the correct position relative to
> java.home for this to work without specifying the bootclasspath
> manually.
>
> Do you know offhand what ecj is on builder? I'll try and look into this ASAP.
> --
> Andrew :-)
>
> Support Free Java!
> Contribute to GNU Classpath and the OpenJDK
> http://www.gnu.org/software/classpath
> http://openjdk.java.net
>

On IRC, we have worked out two main issues with the new setup:

* native ecj on many setups either won't compile code without a
bootclasspath, or if it will, it won't compile 1.5 code (due to an old
copy of gcj)
* gcj -C won't work with the new setup (it is tested after ecj and
javac) because it doesn't handle -source 1.5 -target 1.5.  May be best
just to remove it and let it be handled through a javac wrapper.
-- 
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

Reply via email to