Two small ecj tweaks

Andrew John Hughes gnu_andrew at member.fsf.org
Sun Nov 30 19:06:03 PST 2008


On 30/11/2008, Mark Wielaard <mark at klomp.org> wrote:
> Hi,
>
>  Two tweaks to make sure we have a fast bootstrap ecj available. This
>  makes sure that when we compile the ecj jar with gcj we use
>  -findirect-dispatch so any unresolved references in the jar itself don't
>  make the compilation fail (like what would happen with the
>  eclipse-ecj.jar from fedora 10). Also if we don't have a native-ecj (not
>  configured --with-gcj), but we did detect an ecj binary then use that
>  first before falling back on full interpretation with gij.
>
>  2008-11-30  Mark Wielaard  <mark at klomp.org>
>
>     * Makefile.am (stamps/native-ecj.stamp): Use -findirect-dispatch.
>     * javac.in: Use ecj binary if available and no native-ecj.
>
>  Committed and pushed,
>
>
>  Mark
>
>

Thanks for this.  I still wonder why we detect javac on ecj builds but
don't use it any more -- too many issues in the past I guess.

I would also suggest possibly adding -Dgnu.gcj.precompiled.db.path to
the interpreted invocation.  On at least Debian and Gentoo, the
mapping between ecj.jar and ecj.so is stored in the default database
but as far as I can see, it doesn't get used unless this option is
given.  I patched the Gentoo build today to pass
-Dgnu.gcj.precompiled.db.path=$(gcj-dbtool -p) to @JAVA@ and it gave a
very noticeable speedup.

I presume most people have IcedTea java on their path because that's
about the only way you wouldn't notice how incredibly slow the first
two builds (hotspot-tools and rt) are.  I force the use of java from
gcj-jdk to ensure we still build on gcj and this is very slow without
some form of native compilation either prior to or during the build.
-- 
Andrew :-)

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 distro-pkg-dev mailing list