This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ, libgcc, collect2 and MinGW
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 3 Jul 2006 11:23:51 +0100
- Subject: Re: GCJ, libgcc, collect2 and MinGW
- References: <e8a3b2$br9$1@sea.gmane.org>
Ranjit Mathew writes:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> First off, does any one know why we explicitly include libgcc's
> spec in the libgcj.spec? The GCC driver already seems to arrange
> for a "%G %L %G" linking sequence, where %G is the libgcc linking
> spec and %L is the GCJ linking spec. Since libgcj.spec includes
> libgcc's spec, we end up specifying libgcc's libraries *three
> times* to a collect2 invocation. Nothing catastrophic as such,
> but still weird.
I suspect it's to do with the linker's strict left-to-right argument
processing.
> On to the main query: Does anyone know the incantation that
> can be used in libgcj.spec to insert in an option that will
> affect even the libgcc spec that appears *before it* in the
> linking sequence? For example, "gcc/config/i386/mingw32.h"
> defines:
Look at libgcj.spec:
%rename lib liborig
*lib: -lgcj -lm -lpthread -ldl %(libgcc) %(liborig)
Andrew.