[PATCH 007/149] valgrind: Rework test for unsupported platforms

Tom Rini trini at konsulko.com
Sun Dec 4 16:03:32 CET 2022


Change things so that on an unsupported platform we will #error rather
than undef the feature.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 include/valgrind/valgrind.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/valgrind/valgrind.h b/include/valgrind/valgrind.h
index e59a7fde3211..5d4fa5f43b47 100644
--- a/include/valgrind/valgrind.h
+++ b/include/valgrind/valgrind.h
@@ -121,7 +121,9 @@
 #else
 /* If we're not compiling for our target platform, don't generate
    any inline asms.  */
-#  undef CONFIG_VALGRIND
+#  if IS_ENABLED(CONFIG_VALGRIND)
+#    error "Unsupported platform for valgrind"
+#  endif
 #endif
 
 
-- 
2.25.1



More information about the U-Boot mailing list