FreeBSD/arm64 MACHINE/MACHINE_ARCH identification

Ian Lepore ian at freebsd.org
Wed Feb 11 17:56:09 UTC 2015


On Wed, 2015-02-11 at 12:41 -0500, Ed Maste wrote:
> The FreeBSD/arm64 work in progress currently reports "arm64" for the
> machine and processor type - i.e., uname -m and uname -p.
> 
> It seems that the official, awkward name aarch64 is broadly used
> elsewhere - for example, in toolchain triples and autoconf tests.  To
> save us grief in the future I think it is worth following suit:
> 
> diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h
> index 5cd0445..525a0e7 100644
> --- a/sys/arm64/include/param.h
> +++ b/sys/arm64/include/param.h
> @@ -43,10 +43,10 @@
>  #define STACKALIGN(p)  ((uint64_t)(p) & ~STACKALIGNBYTES)
> 
>  #ifndef MACHINE
> -#define        MACHINE         "arm64"
> +#define        MACHINE         "aarch64"
>  #endif
>  #ifndef MACHINE_ARCH
> -#define        MACHINE_ARCH    "arm64"
> +#define        MACHINE_ARCH    "aarch64"
>  #endif
> 
> I'm not proposing that we rename any of the source files.  I believe
> this approach is consistent with the Debian project - they call it the
> "arm64" port, but report aarch64 from uname.
> 
> I believe it will be much easier for us to carry around any
> special-case s/aarch64/arm64/ in the base system (if necessary) than
> trying to teach third-party software that the FreeBSD 64-bit ARM
> architecture is called arm64 instead of aarch64.
> 
> Any objections or concerns?

That sounds good to me, but we're going to use it consistantly
everywhere an arch name is needed, right?  Like "make
TARGET_ARCH=aarch64 ..." and so on?

-- Ian




More information about the freebsd-arm mailing list