I am building my own Ada runtime system.
However, I can only link again the custom runtime if it is called 'gnat' and compiled to 'libgnat.a' If I call it anything else I get the ld error:
/home/mark/opt/GNAT/2021/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.1/ld: cannot find -lgnat
Any ideas on how to configure this so I can use a different name?
Here's the project file for the runtime (most of it is from OSdev)
project milo is
for Languages use ("Ada");
for Runtime ("Ada") use Project'Project_Dir;
for Library_Auto_Init use "False";
for Library_Name use "milo"; -- that must be "gnat"
for Library_Kind use "static";
for Library_Dir use "lib";
for Object_Dir use "obj";
for Source_Dirs use ("src/zfp", "src/milo");
package Builder is
for Global_Configuration_Pragmas use "milo.adc";
for Switches ("Ada") use (
"-nostdlib",
"-nostdinc"
);
end Builder;
package Compiler is
for Default_Switches ("Ada") use (
"-O2",
"-ffunction-sections",
"-fdata-sections",
"-fcallgraph-info=su,da",
"-gnatp",
"-gnatn2",
"-gnat2012",
"-gnatg",
"-Wl,--gc-sections",
"-gnatyN"
);
end Compiler;
end milo;
And here's the project that I am trying to use this runtime with
project Helloworld is
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("helloworld.adb");
for Runtime ("ada") use "/home/mark/Milo/milo/";
end Helloworld;