This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR libgcj/40868 - ecjx should be build with host compiler


Tom Tromey <tromey@redhat.com> writes:

>>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> All this patch does is substitute "${with_cross_host}-gcc" for
> Andrew> "${with_cross_host}-gcj".  I don't understand why using the gcc
> Andrew> driver rather than the gcj driver makes a difference.  Is this
> Andrew> because the cross host at this point has gcc but not gcj?  If
> Andrew> so, I guess that's fine.
>
> I still don't really understand why the dummy ecjx.cc is needed.

Me neither. All I know ecjx.cc works in native builds, and doesn't in
regular cross-builds. Trying to fix regular cross-builds, not the
"why-ecjx.cc-exists?". 

> But since it is, the important thing here is to arrange to compile it
> with the proper gcc -- the one that matches GCJX_FOR_ECJX.
>

As far as I can see ecjx.o should be the same type as the other objects
linked to produce a host binary. But I couldn't figure out how to get
the regular gcc, since it doesn't seem to be passed to the libjava
configure at all.

The config.log shows xgcc for CC and CXX.

> I think the configure parts of this patch looks ok, but I don't see how
> this patch arranges for ecjx.cc to be compiled by GCC_FOR_ECJX.
>

First compiled "wrong" way, then _LINK target removes bogus object file
&& compile using GCC_FOR_ECJX && do the actual link.

> Also, what Ralf said.
>
> Tom
>





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]