Skip to contentSkip to conversation

sparc64: fix kconfig dependency bug for COMPAT

PATCH New Necip Fazil Yildiran 1 participant 1 message Nov 2, 2020 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: fix kconfig dependency bug for COMPAT

When COMPAT is enabled and BINFMT_ELF is disabled, it results in the following Kbuild warning:

WARNING: unmet direct dependencies detected for COMPAT_BINFMT_ELF
Depends on [n]: COMPAT [=y] && BINFMT_ELF [=n] Selected by [y]:
- COMPAT [=y] && SPARC64 [=y]

The reason is that COMPAT selects COMPAT_BINFMT_ELF without depending on or selecting BINFMT_ELF while COMPAT_BINFMT_ELF depends on BINFMT_ELF. This can also fail building the kernel as demonstrated in a bug report.

Honor the kconfig dependency to remove unmet direct dependency warnings and avoid any potential build failures.

---
 arch/sparc/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/sparc/Kconfig +1 -0
index a6ca135442f9..22df5f0beed5 100644
@@ -496,6 +496,7 @@ config COMPAT
 	bool
 	depends on SPARC64
 	default y
+	select BINFMT_ELF
 	select COMPAT_BINFMT_ELF
 	select HAVE_UID16
 	select ARCH_WANT_OLD_COMPAT_IPC
Signature · 1 line
2.25.1