This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Need help building c4x cross compiler
- From: Ian Lance Taylor <ian at airs dot com>
- To: Grant Mills <gmills at rdinstruments dot com>
- Cc: "'binutils at sources dot redhat dot com'" <binutils at sources dot redhat dot com>
- Date: 28 May 2003 09:19:51 -0700
- Subject: Re: Need help building c4x cross compiler
- References: <EF5112993A929342824EAE9F96D28F221B8D13@RDINT4>
Grant Mills <gmills@rdinstruments.com> writes:
> Here are the commands I ran after unpacking the source.
>
> ../binutils-2.13.91/configure --target=c4x --prefix=`pwd`
> make
> sudo make install
>
> No problem. Everything builds and installs. I add `pwd`/bin to my path and
> run basically the same thing in the gcc directory.
>
> ../gcc-3.3/configure --target=c4x --prefix=`pwd` -enable-language={c,c++}
> make
> Make fails because of an invalid switch being passed to 'as'. The build
> fails when trying to build libgcc.a. The actual error is
> as: unrecognized option `-m40'
When you do this kind of thing, use the same --prefix argument for
both binutils and gcc. Don't use `pwd`. Pick some neutral directory
and use that.
> Which seems to indicate to me that something happened when building xgcc
> which is causing it to pass bad options to as. However, -m40 is valid for
> c4x-as. Did I screw up the configuration of gcc, or the install of
> binutils?
Most likely gcc is invoking the wrong as--the native assembler for
your build system rather than the cross-assembler. Using the same
--prefix is the first step to avoiding that problem.
Also, I assume you have seen this:
http://www.sthoward.com/CrossGCC/
Ian