Need help building c4x cross compiler
Ian Lance Taylor
ian@airs.com
Wed May 28 16:20:00 GMT 2003
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
More information about the Binutils
mailing list