svn commit: r358262 - head/sys/conf

Ian Lepore ian at freebsd.org
Sun Feb 23 19:37:19 UTC 2020


On Sun, 2020-02-23 at 19:04 +0000, Warner Losh wrote:
> Author: imp
> Date: Sun Feb 23 19:04:15 2020
> New Revision: 358262
> URL: https://svnweb.freebsd.org/changeset/base/358262
> 
> Log:
>   Use MACHINE_ARCH instead of TARGET_ARCH
>   
>   TARGET_ARCH is only for use in Makefile.inc1 contexts. MACHINE_ARCH is the
>   preferred thing to set.  Makefile.inc1 sets MACHINE_ARCH in the cross build
>   case, and make sets it in the native build case. This will fix anybody doing a
>   native build. Add a comment for why we have to do this dance so when/if the
>   problem with CFLAGS is fixed for the kernel this workaround can be removed.
> 

I suddenly wonder: why does the kernel build need to know about the
float ABI if we don't use floating point in the kernel?  If it's about
whether to include support for the floating point hardware
(save/restore context at the userland boundary, etc), then shouldn't
that be controlled with a kernel config option or device statement like
it is on other arches?

If the kernel actually is being compiled with different -march= to
generate hardfloat instructions/register usage/etc, then shouldn't
there be some compiler-defined macro to indicate that?  (A quick search
says that __riscv_float_abi_soft may be that macro.)

-- Ian




More information about the svn-src-all mailing list