From 2a3a4111972f7fca624ac6b9c959280cfb75f449 Mon Sep 17 00:00:00 2001 From: Folkert Kevelam Date: Tue, 24 Jun 2025 22:36:31 +0200 Subject: [PATCH] Add gprbuild for runtime --- runtime/runtime.gpr | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/runtime/runtime.gpr b/runtime/runtime.gpr index e69de29..3c59956 100644 --- a/runtime/runtime.gpr +++ b/runtime/runtime.gpr @@ -0,0 +1,49 @@ +library project Runtime is + + for Languages use ("Ada"); + + for Library_Auto_Init use "False"; + for Library_Name use "gnat"; + for Library_Kind use "static"; + for Library_Dir use "adalib"; + + for Object_Dir use ".build"; + + for Source_Dirs use ("adainclude"); + + for Target use "arm-eabi"; + + for Runtime ("Ada") use Runtime'Project_Dir; + + package Compiler is + COMMON_FLAGS := ("-ffunction-sections", "-fdata-sections"); + COMMON_FLAGS := COMMON_FLAGS & ("-g", "-Og"); + ALL_ADAFLAGS := + ("-gnatwae", "-gnatpgn", "-gnatqQ", "-nostdinc") + & COMMON_FLAGS + & external_as_list ("EXTRA_ADAFLAGS", " "); + + ALL_ADAFLAGS := ALL_ADAFLAGS & "-gnata"; + + ALL_CFLAGS := + external_as_list("INCLUDES", " ") + & external_as_list("DEFINES", " ") + & ("-DIN_RTS", "-Dinhibit_libc") & COMMON_FLAGS; + + NO_SIBLING_ADAFLAGS := ("-fno-optimize-sibling-calls"); + NO_REORDER_ADAFLAGS := ("-fno=toplevel-reorder"); + + for Switches ("C") use ALL_CFLAGS; + for Switches ("Ada") use ALL_ADAFLAGS; + end Compiler; + + package Install is + for Prefix use "arm-eabi/lib/gnat/"; + for Sources_Subdir use "adainclude"; + for Ali_Subdir use "adalib"; + for Lib_Subdir use "adalib"; + for Required_Artifacts (".") use ("runtime.xml"); + for Install_Project use "false"; + end Install; + +end Runtime;