crypto: lib/Kconfig - Fix lib built-in failure when arch is modular
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 12 Feb 2025 04:48:55 +0000 (12:48 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2025 07:56:03 +0000 (15:56 +0800)
commit1047e21aecdf17c8a9ab9fd4bd24c6647453f93d
tree8affda139e9d70063e260d28b3eafd24185c28ad
parent3af4e7fa26523852e642cd1462aea99a2183843a
crypto: lib/Kconfig - Fix lib built-in failure when arch is modular

The HAVE_ARCH Kconfig options in lib/crypto try to solve the
modular versus built-in problem, but it still fails when the
the LIB option (e.g., CRYPTO_LIB_CURVE25519) is selected externally.

Fix this by introducing a level of indirection with ARCH_MAY_HAVE
Kconfig options, these then go on to select the ARCH_HAVE options
if the ARCH Kconfig options matches that of the LIB option.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202501230223.ikroNDr1-lkp@intel.com/
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/Kconfig
arch/powerpc/crypto/Kconfig
arch/x86/crypto/Kconfig
lib/crypto/Kconfig