summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Kconfig5
-rw-r--r--src/lib/Makefile.inc1
-rw-r--r--src/lib/gnat/Makefile.inc3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index ae96fc61ee..d108962bac 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -5,6 +5,11 @@ config MISSING_BOARD_RESET
implementation. This activates a stub that logs the missing
board reset and halts execution.
+config ROMSTAGE_ADA
+ bool
+ help
+ Selected by features that use Ada code in romstage.
+
config RAMSTAGE_ADA
bool
help
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 1c7bc22c1e..3e5b151b13 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -339,6 +339,7 @@ $(objcbfs)/%.debug.rmod: $(objcbfs)/%.debug | $(RMODTOOL)
$(obj)/%.elf.rmod: $(obj)/%.elf | $(RMODTOOL)
$(RMODTOOL) -i $< -o $@
+romstage-$(CONFIG_ROMSTAGE_ADA) += cb.ads
ramstage-$(CONFIG_RAMSTAGE_ADA) += cb.ads
ifeq ($(CONFIG_RAMSTAGE_LIBHWBASE),y)
diff --git a/src/lib/gnat/Makefile.inc b/src/lib/gnat/Makefile.inc
index 065ba71404..150a715067 100644
--- a/src/lib/gnat/Makefile.inc
+++ b/src/lib/gnat/Makefile.inc
@@ -51,6 +51,9 @@ $(foreach arch,$(standard-archs), \
$(foreach arch,$(standard-archs), \
$(eval $(call libgnat-template,$(arch))))
+ifeq ($(CONFIG_ROMSTAGE_ADA),y)
+romstage-libs += $(obj)/libgnat-$(ARCH-romstage-y)/libgnat.a
+endif
ifeq ($(CONFIG_RAMSTAGE_ADA),y)
ramstage-libs += $(obj)/libgnat-$(ARCH-ramstage-y)/libgnat.a
endif