as: unrecognized option `-c68020'

Eric Smith eric@brouhaha.com
Thu Oct 23 17:12:00 GMT 1997


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

I don't like doing big hairy builds as root, so unlike the FAQ I do the
'make install' later.

I've been thinking about putting together RPMs (and SRPMs) of the various
cross-development setups I use, so that other people running Red Hat Linux
wouldn't have to mess with it.  I use:

	m68k-aout
	m68k-coff
	h8300-hms
	sh-hms

Cheers,
Eric





More information about the crossgcc mailing list