How is MACHINE_ARCH dervived by make?

Simon J. Gerraty sjg at juniper.net
Wed Nov 26 23:26:42 UTC 2014


Sean Bruno <sbruno at ignoranthack.me> wrote:
> > > I have yet to find the magic bit in the build sys that causes ports to
> > > go off and think that I'm building for amd64.  Building on a real amd64

When you run make, if MACHINE, MACHINE_ARCH etc are not set in
environment make will ask the kernel.

> Looking now ... it sort of looks like there is some shell script hackery
> to do this at build time that depends on uname in machine.sh and os.sh

You can ignore all that - it isn't relevant on BSD.
[bmake builds on some pretty weird systems]
If built with -DMAKE_NATIVE (it is in FreeBSD), then what ever the
kernel provides is used if env vars are missing.



More information about the freebsd-arch mailing list