Index: c/src/lib/libbsp/sparc/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/Makefile.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/Makefile.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -7,4 +7,5 @@
 
 EXTRA_DIST += shared/gnatcommon.c
+EXTRA_DIST += shared/include/gnatcommon.h
 EXTRA_DIST += shared/start/start.S
 
Index: c/src/lib/libbsp/sparc/erc32/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/erc32/Makefile.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/erc32/Makefile.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -40,4 +40,5 @@
 # gnatsupp
 libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
 # console
 libbsp_a_SOURCES += console/erc32_console.c ../../shared/console.c \
@@ -53,5 +54,5 @@
 
 # IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
     ../../shared/include/irq-generic.h \
     ../../shared/include/irq-info.h \
Index: c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c
===================================================================
--- c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/erc32/gnatsupp/gnatsupp.c	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -5,5 +5,5 @@
  */
 
-void __gnat_install_handler_common( int, int );
+#include <bsp/gnatcommon.h>
 
 void
Index: c/src/lib/libbsp/sparc/erc32/preinstall.am
===================================================================
--- c/src/lib/libbsp/sparc/erc32/preinstall.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/erc32/preinstall.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -74,4 +74,8 @@
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
 
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
 $(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
Index: c/src/lib/libbsp/sparc/leon2/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/leon2/Makefile.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon2/Makefile.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -57,4 +57,5 @@
 # gnatsupp
 libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
 # console
 libbsp_a_SOURCES += console/console.c console/debugputs.c
@@ -63,5 +64,5 @@
 libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
 # IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
     ../../shared/include/irq-generic.h \
     ../../shared/include/irq-info.h \
Index: c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c
===================================================================
--- c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon2/gnatsupp/gnatsupp.c	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -11,5 +11,5 @@
  */
 
-void __gnat_install_handler_common (int t1, int t2);
+#include <bsp/gnatcommon.h>
 
 /*
Index: c/src/lib/libbsp/sparc/leon2/preinstall.am
===================================================================
--- c/src/lib/libbsp/sparc/leon2/preinstall.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon2/preinstall.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -142,4 +142,8 @@
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.base
 
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
 $(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
Index: c/src/lib/libbsp/sparc/leon3/Makefile.am
===================================================================
--- c/src/lib/libbsp/sparc/leon3/Makefile.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon3/Makefile.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -46,4 +46,5 @@
 # gnatsupp
 libbsp_a_SOURCES += gnatsupp/gnatsupp.c ../../sparc/shared/gnatcommon.c
+include_bsp_HEADERS = ../shared/include/gnatcommon.h
 # AMBA bus
 include_HEADERS += include/amba.h
@@ -70,5 +71,5 @@
 libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
 # IRQ
-include_bsp_HEADERS = \
+include_bsp_HEADERS += \
     ../../shared/include/irq-generic.h \
     ../../shared/include/irq-info.h \
Index: c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c
===================================================================
--- c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon3/gnatsupp/gnatsupp.c	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -9,5 +9,5 @@
  */
 
-void __gnat_install_handler_common (int t1, int t2);
+#include <bsp/gnatcommon.h>
 
 /*
Index: c/src/lib/libbsp/sparc/leon3/preinstall.am
===================================================================
--- c/src/lib/libbsp/sparc/leon3/preinstall.am	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/leon3/preinstall.am	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -86,4 +86,8 @@
 PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.ngmp
 
+$(PROJECT_INCLUDE)/bsp/gnatcommon.h: ../shared/include/gnatcommon.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/gnatcommon.h
+
 $(PROJECT_INCLUDE)/amba.h: include/amba.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/amba.h
Index: c/src/lib/libbsp/sparc/shared/gnatcommon.c
===================================================================
--- c/src/lib/libbsp/sparc/shared/gnatcommon.c	(revision 2a713e3b944625c45154f0ea7f5703e918de758b)
+++ c/src/lib/libbsp/sparc/shared/gnatcommon.c	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -12,4 +12,5 @@
 #include <signal.h>
 #include <stdlib.h>
+#include <bsp/gnatcommon.h>
 
 /*
Index: c/src/lib/libbsp/sparc/shared/include/gnatcommon.h
===================================================================
--- c/src/lib/libbsp/sparc/shared/include/gnatcommon.h	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
+++ c/src/lib/libbsp/sparc/shared/include/gnatcommon.h	(revision 52f6502876b5c540cb2ca0cd6c87f4e8b96acbcd)
@@ -0,0 +1,19 @@
+#ifndef __GNATCOMMON_H
+#define __GNATCOMMON_H
+
+/*
+ * Support for gnat/rtems interrupts and exception handling.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void __gnat_install_handler (void);
+void __gnat_install_handler_common (int t1, int t2);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
