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!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using System.Machine_Code in GPL 2017 Zfp for Arm Date: Mon, 13 Nov 2017 11:40:12 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="8f5626f630ebbbb3957b898752056aef"; logging-data="7070"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18s1oclKNnVcnXedGiVFNTzr6H+9MohDs0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:zvAp5K0HYDckaXSPkS7km0sMD9g= sha1:X5y+gEzxqY4B96Fd339FHNruhKU= Xref: feeder.eternal-september.org comp.lang.ada:48850 Date: 2017-11-13T11:40:12+00:00 List-Id: ahlan@marriott.org writes: > We are trying to build a zfp system for an arm M3 processor that is > not on the list of supported GPL processors. > We only want the Ada intrinsics. We do not need or want any RTS and so > expected that --RTS=zfp would do the trick. > however when we place this switch on arm-eabi-gcc from GPL 2017 we get > the error message > RTS path not valid: Missing adainclude and adalib directories. > So things are not as simple as we thought. > It appears that --RTS takes the name of a directory so we created one > and named this on the RTS switch. > In the directory we placed two files ada_object_path and > ada_source_path that both contain the single word gnat. I'd expect ada_object_path to contain the word adalib, and adalib/ to contain the .ali's and .a(s), or perhaps .o's. Don't know what happens if you put them in gnat/ with the sources, but it seems to work for you! (and you shouldn't need adalib/ at all - though the compiler/gnatls/gprconfig rules for determining whether this looks enough like an RTS are a bit arbitrary & changeable & not necessarily consistent). > In the RTS directory we then created the empty directory adalib and > another directory gnat and placed in gnat directory the file > System.ads which we copied from an RTS directory of a similar > processor. > This all seems to work. > With this we are able to create simple programs. > However when we want to use System.Machine_Code we get the error message that > System.Machine_Code is not a predefined library. > I suspect that we need to add something to our RTS directory. You need s-maccod.ads (from the same place; looks pretty machine-independent). GNAT GPL 2017 has $prefix/arm-eabi/lib/gnat/zfp-lm3s which is an M3 system.