cross configuration question.
Douglas B Rupp
rupp@gnat.com
Tue Jun 24 13:23:00 GMT 2003
> Douglas B Rupp wrote:
> > I'm trying to configure a cross compiler.
>
> There isn't enough info here. You didn't mention how you configured, or
> what error you are getting.
export AS_FOR_TARGET=ias; <similarly for LD and AR>;
../src/gcc/configure --host=... --target=...
>
> > For the top level configure I export AR_FOR_TARGET, AS_FOR_TARGET, and
> > LD_FOR_TARGET and the configure works fine.
>
> This shouldn't be necessary. configure will take care of this stuff for
> you.
It doesn't seem to be doing so.
>
> > However when I do the "make", the gcc configure ignores the above and
wants
> > to use the host utilities.
>
> I am guessing that this is failing when the gcc driver is used.
No. The problem with the assembler is that gcc/configure goes through a
procedure to test the assembler for some features and this determines what
arguments gcc passes when it calls the assembler, but it tests the wrong
assembler e.g. the host assembler regardless of the value of AS_FOR_TARGET.
I can force it to use the correct assembler by exporting
"DEFAULT_ASSEMBLER", but this seems wrong. I'm not building a cross gas,
its a vendor provided cross assembler. I've temporarily worked around the
problem be doing the above (DEFAULT ASSEMBLER) and then building wrappers
for the cross assembler and cross linker so that xgcc can find them in the
build directory (e.g. for building libgcc). For the cross archiver: naming
it the full target prefixed name-ar and putting it on the PATH. It's
rather messy.
More information about the Gcc
mailing list