Two small ecj tweaks

Andrew Haley aph at redhat.com
Mon Dec 1 04:22:03 PST 2008


Andrew John Hughes wrote:
> On 01/12/2008, Andrew John Hughes <gnu_andrew at member.fsf.org> wrote:
>> On 01/12/2008, Andrew Haley <aph at redhat.com> wrote:
>>  > Andrew John Hughes wrote:
>>  >  > 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.
>>  >
>>  >
>>  > It certainly should.  If you have an example of any case where this fails, please
>>  >  let me know and I'll follow it up with the maintainers.
>>  >
>>  >  I'd like a login so I can see why this isn't working.
>>  >
>>  >
>>  >  Andrew.
>>  >
>>
>>
>> Well here's the straces for each:
>>
>>  strace -f -o out.nodb /usr/lib/jvm/gcj-jdk/bin/java -cp
>>  /usr/share/eclipse-ecj-3.3/lib/ecj.jar
>>  org.eclipse.jdt.internal.compiler.batch.Main -1.5 Test.java
>>
>>  strace -f -o out.db /usr/lib/jvm/gcj-jdk/bin/java
>>  -Dgnu.gcj.precompiled.db.path=/usr/lib64/gcj-4.3.3-9/classmap.db -cp
>>  /usr/share/eclipse-ecj-3.3/lib/ecj.jar
>>  org.eclipse.jdt.internal.compiler.batch.Main -1.5 Test.java
>>
>>  Only out.db includes:
>>
>>  out.db:16889 open("/usr/lib64/native_ecj-3.3.so", O_RDONLY) = 5
>>
>>  There is no reference to it in out.nodb.

Please use strace -etrace=file -s 99999999

Andrew.



More information about the distro-pkg-dev mailing list