diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8fd2dbf7eb5b411053ad697b493012e42dcf678c..77491e311791ee807d8ee082b4bae7e966d499d2 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -373,6 +373,7 @@ config FORCED_INLINING
 
 config HEADERS_CHECK
 	bool "Run 'make headers_check' when building vmlinux"
+	depends on !UML
 	help
 	  This option will extract the user-visible kernel headers whenever
 	  building the kernel, and will run basic sanity checks on them to