On Sun, Dec 18, 2016 at 04:14:13PM +0100, Patrick Wildt wrote:
> On Mon, Dec 19, 2016 at 02:10:05AM +1100, Jonathan Gray wrote:
> > On Sun, Dec 18, 2016 at 03:54:40PM +0100, Patrick Wildt wrote:
> > > Hi,
> > > 
> > > I would like to introduce a list of architectures that use Clang instead
> > > of gcc.  This will probably be helpful for specifying when and when not
> > > to compile libraries for clang and clang itself.  Additionally I would
> > > like to add it to make it useful for cross-compile bootstrap of arm64.
> > > 
> > > The second part of the diff adds arm64 to the cross-compile Makefile.
> > > Considering we don't have binutils for aarch64 in base, I also added
> > > a check to skip binutils for aarch64.
> > > 
> > > Comments?
> > 
> > Shouldn't MACHINE_ARCH be arm64 not aarch64?
> 
> Unfortunately not.  The arch is aarch64 (and the toolchain), while our
> port of an aarch64 compatible system is called arm64.

I was curious to see how the various values are used, for anyone
interested here is how it looks in terms of uname/make.

machine[] in kernel (set to MACHINE from param.h)               arm64
hw.machine sysctl (set to machine[])                            arm64
uname(3) utsname.machine (from hw.machine sysctl)               arm64
make MACHINE (from uname utsname.machine)                       arm64
uname -m (from uname utsname.machine)                           arm64
getty %m (from uname utsname.machine)                           arm64 
mandoc arch (MACHINE from param.h)                              arm64
arch -k/machine (MACHINE from param.h)                          arm64

make MACHINE_ARCH (from param.h)                                aarch64
make MACHINE_CPU (from param.h if defined else MACHINE_ARCH)    aarch64
uname -p (from MACHINE_ARCH in param.h)                         aarch64
arch/machine -a (from MACHINE_ARCH in param.h)                  aarch64

In make, MACHINE, MACHINE_ARCH, and MACHINE_CPU can also be forced by
setting environment variables. MACHINE can be set in environment or
via -S for mandoc.

The only arch that sets MACHINE_CPU in param.h is loongson where
MACHINE_ARCH is mips64el and MACHINE_CPU is mips64.  MACHINE_CPU
only differs here when non canonical endianness is used.

And the triple used is aarch64-unknown-openbsd6.0 ?

Reply via email to