> I was wondering if it would be possible to allow the override the
> definition of MACHINE_ARCH /__MACHINE_ARCH in amd64/param.h by wrapping
> them around ifndef statement.
> 
> Index: sys/arch/amd64/include/param.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/include/param.h,v
> retrieving revision 1.22
> diff -u -p -u -r1.22 param.h
> --- sys/arch/amd64/include/param.h    26 Mar 2013 05:04:10 -0000      1.22
> +++ sys/arch/amd64/include/param.h    12 Oct 2015 15:17:03 -0000
> @@ -45,8 +45,12 @@
> 
>  #define      _MACHINE        amd64
>  #define      MACHINE         "amd64"
> +#ifndef _MACHINE_ARCH
>  #define      _MACHINE_ARCH   amd64
> +#endif
> +#ifndef MACHINE_ARCH
>  #define      MACHINE_ARCH    "amd64"
> +#endif
>  #define      MID_MACHINE     MID_AMD64
> 
>  #define      PAGE_SHIFT      12
> 
> Being able to override is useful in scenarios where you group arch name
> variants under a common alias, at the moment using such a mechanism
> fails under OpenBSD/amd64 as whatever is passed in during build time is
> overwritten by the inclusion of <sys/param.h>.

That makes absolutely no sense.  I don't see any purpose to this.  You
have failed to explain the usage case; I don't believe there is any
scenario where people benefit from more architecture divergence.

Reply via email to