as: unrecognized option `-c68020'
Rolf Fiedler (Rolf.Fiedler@ferrari.de)
Fri, 24 Oct 1997 08:27:46 +0100 (MET)
On Fri, 24 Oct 1997, Eric Smith wrote:
> Neil Youngman <n.youngman@videonetworks.com> wrote:
> > I'm trying to build a cross-compiler to compile for a 68000 (m68k-aout)
> > on a linux host. I've followed the instructions in the FAQ and it dies
> > while building libgcc with the message
> > "as: unrecognized option `-c68020'"
> >
> > According to the gas manual the correct option is -mc68020. I've
> > grepped through everything in the source tree to try to find where the
> > string -c68020 comes from, but with no success.
>
> This seems to bite a lot of people, and the (somewhat unhelpful) answer
> given
> on the list is always "read the FAQ". The FAQ does in fact state
> Were GCC and Binutils configured with the same
> --prefix/--exec-prefix
> arguments?
> but it never occurred to me that if I didn't explicitly specify the
> prefix option, that it wouldn't default to something reasonable.
>
> The problem is that when binutils is built for cross-development, the
> prefix defaults (correctly) to /usr/local. However, GCC does not
> use the same default, so it is necessary to explicitly specify the
> prefix
> on configure's command line.
>
> For example, starting from a directory containing the tarballs, I use
> basically the following commands:
>
> tar -xzf binutils-2.8.1.tar.gz
> mkdir binutils-m68k-aout
> cd binutils-m68k-aout
> ../binutils-2.8.1/configure --target=m68k-aout --prefix=/usr/local
> make
>
> tar -xzf gcc-2.7.2.3.tar.gz
> mkdir gcc-m68k-aout
> cd gcc-m68k-aout
> ../gcc-2.7.2.3/configure --target=m68k-aout --prefix=/usr/local
> make LANGUAGES=c
>
there is one drawback with that...
if you start the compiler by typing
gcc -barchitecture
instead of
gcc-architecture-name
the hosts gcc driver will not find the compiler.
I usually use two links as a countermeasure for the problem
first
ln -s /usr/local/architecture-name /usr/architecture-name
and if gcc-architecture is installed in /usr/local you need
to add
ln -s /usr/local/lib/gcc-lib/architecture /usr/lib/gcc-lib/architecture
works on my linux box with gcc2 and cygnus cdk for a29k-amd-udi and
m68k-coff.
cheers,
Rolf
+-----------------+-----------------------------------------+
| _____ | Rolf Fiedler |
| / ___/ | Electronic Design Engineer |
| / _/ | Ferrari electronic GmbH |
| /_/e/r/r/a/r/i/ | phone: +49 3328 4559 0 |
| electronic | E-Mail: Rolf.Fiedler@Ferrari.DE |
| | fax : +49 3328 4559 60 |
+-----------------+-----------------------------------------+
"Where do you want to go tomorrow?"