]> git.baikalelectronics.ru Git - kernel.git/commit
int128: move __uint128_t compiler test to Kconfig
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Nov 2019 12:22:27 +0000 (13:22 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 17 Nov 2019 01:02:42 +0000 (09:02 +0800)
commit094ed904d0f0ea61db3d3d9fd0a0949fa6003068
tree64959cb56d0c20f365e28e3f45b9ce9d6a779d13
parent7be773d6c77fe77f0536a3f3b292b9eb022c718a
int128: move __uint128_t compiler test to Kconfig

In order to use 128-bit integer arithmetic in C code, the architecture
needs to have declared support for it by setting ARCH_SUPPORTS_INT128,
and it requires a version of the toolchain that supports this at build
time. This is why all existing tests for ARCH_SUPPORTS_INT128 also test
whether __SIZEOF_INT128__ is defined, since this is only the case for
compilers that can support 128-bit integers.

Let's fold this additional test into the Kconfig declaration of
ARCH_SUPPORTS_INT128 so that we can also use the symbol in Makefiles,
e.g., to decide whether a certain object needs to be included in the
first place.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm64/Kconfig
arch/riscv/Kconfig
arch/x86/Kconfig
crypto/ecc.c
init/Kconfig
lib/ubsan.c
lib/ubsan.h