Hi;
I have gnat 13.1.0 on my M1 Mac;
(thank you, Simon! <GRIN>)
I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?
I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external documentation.
I hope that this is not a stupid question.
Perhaps there is a gnatmake flag or gnat doc that I'm just not seeing.
Thanks,
Ken Wolcott
I have gnat 13.1.0 on my M1 Mac;
(thank you, Simon! <GRIN>)
I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?
I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in external
documentation.
$ gnatkr gnatkr ada.sequential_io.ads
a-sequio.ads
Kenneth Wolcott writes:
I have gnat 13.1.0 on my M1 Mac;
(thank you, Simon! <GRIN>):bow:
I'd like to have my own Ada+GNAT *.ad[sb] library files, where are they?If you just want to insect them, see below: if you want to alter them, that'd be a bit tricker. As far as I can remember, GNAT Pro releases
provide for rebuilding the runtime, but the FSF builds don't.
I can find the Ada libraries (*.ad[sb]) but it sometimes is hard to (reliably) find all of the GNAT Ada libraries in externalThey're in {prefix}/lib/gcc/{target}/{release}/adainclude/ - i.e., in
documentation.
your case (unless you've moved the install)
/opt/gcc-13.1.0-aarch64/lib/gcc/aarch64-apple-darwin21/13.1.0/adainclude/
But you say you know that. I wonder whether it's the crunched filenames
that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):
$ gnatkr gnatkr ada.sequential_io.ads
a-sequio.ads
(you don't actually need whatever's after the final period to be the
actual file extension: you could use '.open' or just '.').
But you say you know that. I wonder whether it's the crunched filenames[fixed typo]
that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):
$ gnatkr ada.sequential_io.ads
a-sequio.ads
(you don't actually need whatever's after the final period to be the
actual file extension: you could use '.open' or just '.').
Simon Wright writes:
[...]
But you say you know that. I wonder whether it's the crunched filenames that are confusing? (a legacy of the days when DOS 8.3 filenames were required for a large part of GNAT's target audience). You can find the crunched filename for a package using gnatkr (gnat krunch):
$ gnatkr ada.sequential_io.ads[fixed typo]
a-sequio.ads
(you don't actually need whatever's after the final period to be the actual file extension: you could use '.open' or just '.').Which raises a question: Why does GNAT still use crunched filenames? It probably makes sense to continue to support them (does anyone use GNAT
on MS-DOS?), but I wouldn't think it would be difficult to use full file names on the vast majority of systems that support them. It's not a
huge deal, but using full file names where possible would be less
annoying.
On Sunday, June 25, 2023 at 5:49:11 PM UTC-4, Keith Thompson wrote:
Simon Wright writes:
[...]
But you say you know that. I wonder whether it's the crunched filenames[fixed typo]
that are confusing? (a legacy of the days when DOS 8.3 filenames were
required for a large part of GNAT's target audience). You can find the
crunched filename for a package using gnatkr (gnat krunch):
$ gnatkr ada.sequential_io.ads
a-sequio.adsWhich raises a question: Why does GNAT still use crunched filenames? It
(you don't actually need whatever's after the final period to be the
actual file extension: you could use '.open' or just '.').
probably makes sense to continue to support them (does anyone use GNAT
on MS-DOS?), but I wouldn't think it would be difficult to use full file
names on the vast majority of systems that support them. It's not a
huge deal, but using full file names where possible would be less
annoying.
Unless they changed how the GNAT compiler works in the last few years,
then my guess is inertia
to do that. Right before the pandemic hit, I had the neat idea of
doing my own bare metal
runtime and to use normal uncrunched names. The RTS compiled just
fine doing that. However,
when I tried to use the RTS to build a full fledged program, it failed
to find the package in the RTS.
I don't recall if it failed at compile time or link time, but
crunching the names and recompiling the
RTS fixed the issue. So something in their compiler requires the
crunched names, or if they have
since changed that, used to require it.
The package in the compiler that deals with crunched names is Rtsfind, https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/rtsfind.ads
Simon Wright writes:
$ gnatkr ada.sequential_io.ads
a-sequio.ads
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:29:19 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,054 |