From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to configure GNAT GPL on x86-64 Linux for ARM ELF development Date: Wed, 23 May 2018 09:07:51 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: h2725194.stratoserver.net; posting-host="c4c7d705a3e848ab8e63cccb6944655a"; logging-data="12231"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oep6x7Tc4DdugQ2F4Z7L5hkh1GxreHJw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:SIj9xF6tB/aRArhUDUw4ILUYj+0= sha1:tsGbSafbwon2VNIIjciZV+puTqk= Xref: reader02.eternal-september.org comp.lang.ada:52614 Date: 2018-05-23T09:07:51+01:00 List-Id: Adam Jensen writes: > $ arm-eabi-gcc -c -mcpu=cortex-m4 -mthumb program.adb > fatal error, run-time library not installed correctly > cannot locate file system.ads > compilation abandoned > Any advice on how to proceed would be very much appreciated! I think that the reason why the tutorial works and your attempt doesn't is that the tutorial was developed on a Raspberry Pi, which is already an ARM-based machine, so the native compiler actually has a runtime (i.e. system.ads etc etc) visible to it. Yours doesn't, and gcc-for-ada must see an RTS. I managed to get a compilation using this over-the-top incantation: $ gprbuild -c -u -f program.adb --target=arm-eabi --RTS=zfp-stm32f4 but a simpler (more memorable!) procedure might be to construct your own: 1. Create directories adainclude/, adalib/ 2. Copy $prefix/arm-eabi/lib/gnat/zfp-stm32f4/gnat/system.ads to your adainclude/ ($prefix is the root of your compiler installation, I think ~/.local/gnat-arm) The zfp- (zero footprint) runtime is the closest to what you need, and the fact that the -stm32f4 part isn't quite right shouldn't matter; I suspect that system.ads is the same for all the zfp runtimes. Now, $ arm-eabi-gcc --RTS=. -c program.adb