Subject: Re: make: MACHINE vs. MACHINE_ARCH
To: Curt Sampson <>
From: Ty Sarna <>
List: current-users
Date: 12/22/1996 18:31:36
Curt Sampson wrote:
> Does anyone out there know the original intention behind the use
> of MACHINE and MACHINE_ARCH? Since MACHINE_ARCH is set by make,
> and cannot be overridden in the environment, I would assume that
> that would be used for things dependent on the host system only,
> rather than the target system. However, in some places MACHINE_ARCH

You're misunderdstanding what they're for.  MACHINE and MACHINE_ARCH
aren't for cross-compiling.  They both specify features of the target
(==host, since there is not working cross-compilation support).  MACHINE
is the platform type (sun3, pmax, etc).  MACHINE_ARCH is the cpu
architecture (m68k, mips). 

> is not used this way. For example, in src/lib/csu/Makefile, we set
> `SUBDIR= ${MACHINE_ARCH}', which is obviously incorrect if we're

This is because the startup code is CPU-dependant, not

> on an alpha but compiling for a sparc,  or even just doing a
> `MACHINE=sparc make obj' on an Alpha otherwise being used as an
> NFS server for a sparc.

I suspect you're confused because on the system you mentions, plus i386,
MACHINE == MACHINE_ARCH. However, for MACHINE = {sun3,amiga,atari,hp300,x68k}
MACHINE_ARCH is m68k, and MACHINE={pmax,pico} has MACHINE_ARCH=mips.