However this does not work when using GPRbuild with a specific config file:
$ PATH="${HOME:?}/gcc-15.2.0_native/bin:${HOME:?}/gcc-15.2.0_sparc64-unknown-elf/bin" gprbuild -P libdsa.gpr --config=sparc64-unknown-elf.cgpr --RTS=${HOME:?}/bare_runtime
warning: runtimes are taken into account only in auto-configuration
libdsa.gpr:7:17: warning: there are no sources of language "C" in this project
Compile
[Ada] bit_ops.adb
fatal error, run-time library not installed correctly
cannot locate file system.ads
compilation abandoned
gprbuild: *** compilation phase failed
I suspect the warning is telling me if I use --config= option, then --RTS= option is ignored. I tried setting for Runtime_Dir (“Ada”) use “<path_to_runtime>” in .cgpr file but that did not seem to help.
Any ideas how to tell GPRbuild where to find this runtime?
Because it tells GPRbuild where and how to locate my bare metal cross-compiler. Without it GPRbuild produces these errors:
$ PATH="${HOME:?}/gcc-15.2.0_native/bin:${HOME:?}/gcc-15.2.0_sparc64-unknown-elf/bin" gprbuild -P libdsa.gpr --target=sparc64-unknown-elf --RTS=${HOME:?}/bare_runtime
gprconfig: can't find a toolchain for the following configuration:
gprconfig: language 'ada', target 'sparc64-unknown-elf', runtime '/home/user/bare_runtime'
libdsa.gpr:7:17: warning: there are no sources of language "C" in this project
libdsa.gpr:9:33: warning: libraries are not supported on this platform
libdsa.gpr:7:17: no compiler for language "Ada", cannot compile "bit_ops.ads"
gprbuild: *** compilation phase failed
these paths seem to be hardcoded to default locations when looking for a runtime. Ideally I want to find a way to specify the runtime explicitly in a different location, as I want to experiment with different runtimes.
Am I missing something or GPRbuild is just not flexible enough to locate the runtime via --RTS= command line option or the equivalent Runtime project option?
The --RTS= should be working… However, pointing the linker to the appropriate rts (libgnat.a) is also okay as seen in the Ironclad kernel build script: First filename). Third.
Anyone knows the rationale for why GPRbuild ignores --RTS= option when used with --config= option? Because if the alternative is to use Runtime_Dir in *.cgpr file, well that option also seems to be ignored.