[RFC PATCH v2 09/31] kvx: Add build infrastructure
Arnd Bergmann
arnd at arndb.de
Fri Jan 20 06:39:22 PST 2023
On Fri, Jan 20, 2023, at 15:09, Yann Sionneau wrote:
> - Fix clean target raising an error from gcc (LIBGCC)
I had not noticed this on v1 but:
> +# Link with libgcc to get __div* builtins.
> +LIBGCC := $(shell $(CC) $(DEFAULT_OPTS) --print-libgcc-file-name)
It's better to copy the bits of libgcc that you actually need
than to include the whole thing. The kernel is in a weird
state that is neither freestanding nor the normal libc based
environment, so we generally want full control over what is
used. This is particularly important for 32-bit architectures
that do not want the 64-bit division, but there are probably
enough other cases as well.
Arnd
More information about the linux-riscv
mailing list