libsel4platsupport: fix seL4_DebugPutChar detection

Serial console support can fall back to using seL4_DebugPutChar. But
it does this based on the kernel's CONFIG_DEBUG_BUILD config parameter
which is wrong--the support is actually based on CONFIG_PRINTING which
is implictly enabled when CONFIG_DEBUG_BUILD is set. This is confirmed
by the fact the actual usage of seL4_DebugPutChar is conditional on
CONFIG_PRINTING. Replace CONFIG_DEBUG_BUILD use with CONFIG_PRINTING.

This has the added benefit of fixing sel4test serial server test cases
when a release build is used.

Bug: 250071553

Change-Id: I50cc2c898be43ff95f4c8fa53c6ed7bb3446bca2
diff --git a/libsel4platsupport/src/common.c b/libsel4platsupport/src/common.c
index 38dfdca..3958d85 100644
--- a/libsel4platsupport/src/common.c
+++ b/libsel4platsupport/src/common.c
@@ -62,7 +62,7 @@
 static seL4_CPtr device_cap = 0;
 extern char __executable_start[];
 
-#if !(defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_DEBUG_BUILD))
+#if !(defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_PRINTING))
 static void *__map_device_page(void *cookie, uintptr_t paddr, size_t size,
                                int cached, ps_mem_flags_t flags);
 
@@ -207,7 +207,7 @@
     }
     memset(&_simple_mem, 0, sizeof(simple_t));
     memset(&_vka_mem, 0, sizeof(vka_t));
-#if defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_DEBUG_BUILD)
+#if defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_PRINTING)
     /* only support putchar on a debug kernel */
     setup_status = SETUP_COMPLETE;
 #else
@@ -238,7 +238,7 @@
         assert(!"You cannot recover");
         return -1;
     }
-#if defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_DEBUG_BUILD)
+#if defined(CONFIG_LIB_SEL4_PLAT_SUPPORT_USE_SEL4_DEBUG_PUTCHAR) && defined(CONFIG_PRINTING)
     /* only support putchar on a debug kernel */
     setup_status = SETUP_COMPLETE;
 #else