Index: c/src/lib/libbsp/sparc/leon3/console/printk_support.c
===================================================================
--- c/src/lib/libbsp/sparc/leon3/console/printk_support.c	(revision 011efee8139a5ec526c549704c78372b2205a92f)
+++ c/src/lib/libbsp/sparc/leon3/console/printk_support.c	(revision 229c42499ea44865acb1fb9308a9656d99dbe85e)
@@ -26,6 +26,6 @@
 #include <bsp/apbuart_termios.h>
 
-int debug_uart_index __attribute__((weak)) = 0;
-struct apbuart_regs *dbg_uart = NULL;
+int leon3_debug_uart_index __attribute__((weak)) = 0;
+struct apbuart_regs *leon3_debug_uart = NULL;
 
 /* Before UART driver has registered (or when no UART is available), calls to
@@ -46,22 +46,22 @@
   struct ambapp_apb_info *apb;
 
-  /* Update debug_uart_index to index used as debug console.
-   * Let user select Debug console by setting debug_uart_index. If the
-   * BSP is to provide the default UART (debug_uart_index==0):
+  /* Update leon3_debug_uart_index to index used as debug console. Let user
+   * select Debug console by setting leon3_debug_uart_index. If the BSP is to
+   * provide the default UART (leon3_debug_uart_index==0):
    *   non-MP: APBUART[0] is debug console
    *   MP: LEON CPU index select UART
    */
-  if (debug_uart_index == 0) {
+  if (leon3_debug_uart_index == 0) {
 #if defined(RTEMS_MULTIPROCESSING)
-    debug_uart_index = LEON3_Cpu_Index;
+    leon3_debug_uart_index = LEON3_Cpu_Index;
 #else
-    debug_uart_index = 0;
+    leon3_debug_uart_index = 0;
 #endif
   } else {
-    debug_uart_index = debug_uart_index - 1; /* User selected dbg-console */
+    leon3_debug_uart_index--; /* User selected dbg-console */
   }
 
   /* Find APBUART core for System Debug Console */
-  i = debug_uart_index;
+  i = leon3_debug_uart_index;
   adev = (void *)ambapp_for_each(&ambapp_plb, (OPTIONS_ALL|OPTIONS_APB_SLVS),
                                  VENDOR_GAISLER, GAISLER_APBUART,
@@ -72,7 +72,7 @@
      */
     apb = (struct ambapp_apb_info *)adev->devinfo;
-    dbg_uart = (struct apbuart_regs *)apb->start;
-    dbg_uart->ctrl |= APBUART_CTRL_RE | APBUART_CTRL_TE;
-    dbg_uart->status = 0;
+    leon3_debug_uart = (struct apbuart_regs *)apb->start;
+    leon3_debug_uart->ctrl |= APBUART_CTRL_RE | APBUART_CTRL_TE;
+    leon3_debug_uart->status = 0;
   }
 }
@@ -87,5 +87,5 @@
 static void bsp_out_char(char c)
 {
-  if (dbg_uart == NULL) {
+  if (leon3_debug_uart == NULL) {
     /* Local debug buffer when UART driver has not registered */
     pre_printk_dbgbuf[pre_printk_pos++] = c;
@@ -94,5 +94,5 @@
   }
 
-  apbuart_outbyte_polled(dbg_uart, c, 1, 1);
+  apbuart_outbyte_polled(leon3_debug_uart, c, 1, 1);
 }
 
@@ -109,8 +109,8 @@
   int tmp;
 
-  if (dbg_uart == NULL)
+  if (leon3_debug_uart == NULL)
     return EOF;
 
-  while ((tmp = apbuart_inbyte_nonblocking(dbg_uart)) < 0)
+  while ((tmp = apbuart_inbyte_nonblocking(leon3_debug_uart)) < 0)
     ;
   return tmp;
Index: c/src/lib/libbsp/sparc/leon3/include/leon.h
===================================================================
--- c/src/lib/libbsp/sparc/leon3/include/leon.h	(revision 011efee8139a5ec526c549704c78372b2205a92f)
+++ c/src/lib/libbsp/sparc/leon3/include/leon.h	(revision 229c42499ea44865acb1fb9308a9656d99dbe85e)
@@ -365,5 +365,5 @@
  * ...
  */
-extern int debug_uart_index;
+extern int leon3_debug_uart_index;
 
 /* Let user override which on-chip TIMER core will be used for system clock
Index: c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c
===================================================================
--- c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c	(revision 011efee8139a5ec526c549704c78372b2205a92f)
+++ c/src/lib/libbsp/sparc/shared/uart/apbuart_cons.c	(revision 229c42499ea44865acb1fb9308a9656d99dbe85e)
@@ -49,5 +49,7 @@
   int wait_sent);
 extern int apbuart_inbyte_nonblocking(struct apbuart_regs *regs);
-extern struct apbuart_regs *dbg_uart; /* The debug UART */
+#ifdef LEON3
+extern struct apbuart_regs *leon3_debug_uart; /* The debug UART */
+#endif
 
 /* Probed hardware capabilities */
@@ -264,5 +266,5 @@
 	db = 0;
 #ifdef LEON3
-	if (priv->regs == dbg_uart) {
+	if (priv->regs == leon3_debug_uart) {
 		db = priv->regs->ctrl & (LEON_REG_UART_CTRL_RE |
 					LEON_REG_UART_CTRL_TE |
@@ -511,5 +513,5 @@
 #ifdef LEON3
 	/* Disable TX/RX if not used for DEBUG */
-	if (uart->regs != dbg_uart)
+	if (uart->regs != leon3_debug_uart)
 		uart->regs->ctrl &= ~(APBUART_CTRL_RE | APBUART_CTRL_TE);
 #endif
