Subject: Re: MACHINE_ARCH on mips
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: Parag Patel <parag@cgt.com>
List: tech-toolchain
Date: 07/25/1998 13:47:53
>o OpenBSD/arc seems to use arc, I think (my openbsd machine is off to
>>  keep the room cool).
>
>Eek. For machine, or ${MACHINE_ARCH}?

For $MACHINE, I believe.  $MACHINE_ARCH is still "mips".

I have a MIPS gcc cross-compiler built on FreeBSD for a customer to build OpenBSD and our SmartFirmware product for a custom MIPS platform (which is similar to the arc but uses a new NKK support chipset).  I configured gcc with "mipsel-arc-openbsd".

A script "arcmake" on FreeBSD sets the environment to build OpenBSD before invoking make.  I set: 

	MACHINE=arc MACHINE_ARCH=mips ARCH=mips TARGET=mips

I don't know which are necessary now, but at one time or another they were needed to cross-compile some piece of software.

(The MIPS test board is currently down for a hardware upgrade so I can't verify that OpenBSD/arc uses the same MACHINE/MACHINE_ARCH settings.  Sorry.)

Regardless of how gcc is configured for MIPS, it is capable of generating binaries for either endian and code for any MIPS processor.  Compiler options -EB and -EL switch the endian.  The initial config is only to set the default.

Just my two cents to further muddy a confusing issue.


	-- Parag Patel