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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.99.201 with SMTP id es9mr12781461obb.25.1434652769625; Thu, 18 Jun 2015 11:39:29 -0700 (PDT) X-Received: by 10.182.138.9 with SMTP id qm9mr131212obb.34.1434652769576; Thu, 18 Jun 2015 11:39:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h15no5140851igd.0!news-out.google.com!kd3ni10347igb.0!nntp.google.com!h15no5140845igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 18 Jun 2015 11:39:29 -0700 (PDT) In-Reply-To: <86egl9do8p.fsf@stephe-leake.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=74.203.194.21; posting-account=bXcJoAoAAAAWI5APBG37o4XwnD4kTuQQ NNTP-Posting-Host: 74.203.194.21 References: <888a3bd7-6ce8-4458-8725-8330680f48de@googlegroups.com> <86egl9do8p.fsf@stephe-leake.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8a492b13-7f08-4597-aa14-5aa8715850f5@googlegroups.com> Subject: Re: Emacs Ada mode with RTS From: Patrick Noffke Injection-Date: Thu, 18 Jun 2015 18:39:29 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26376 Date: 2015-06-18T11:39:29-07:00 List-Id: On Thursday, June 18, 2015 at 10:34:35 AM UTC-5, Stephen Leake wrote: > Patrick Noffke writes: > > Just a guess, but this looks like you are mixing 64 bit and 32 bit > systems? Are you trying to cross-compile? > Yes, I'm cross-compiling for an ARM Cortex-M4 target on a x86_64 host, using a Ravenscar-sfp runtime. With 5.1.8, the problem is gone. I can "check syntax" and build the project (still using the same custom check_cmd, make_cmd, and comp_cmd that call gprbuild with my config file). > > Here are some variables from my .adp file: > > > > toolchain_dir=/home/pnoffke/projects/proj1/output/toolchain/gnat/bin > > ada_compiler=${toolchain_dir}/arm-eabi-gnat > > gpr_file=/home/pnoffke/projects/proj1/proj1.gpr > > config_file=/home/pnoffke/projects/proj1/obj/proj1.cgpr > > check_cmd=${toolchain_dir}/gprbuild -u -c -gnatc -p -P${gpr_file} > > --target=arm-eabi --config=${config_file} ${full_current} > > make_cmd=PATH=${toolchain_dir}:$PATH ${toolchain_dir}/gprbuild -p > > --target=arm-eabi -P${gpr_file} --config=${config_file} > > comp_cmd=${toolchain_dir}/gprbuild -u -c -gnatc -p -P${gpr_file} > > --target=arm-eabi --config=${config_file} ${full_current} > > Some of this may no longer be supported in 5.1.8, but I have not checked > in detail. > It seems to work in 5.1.8. I haven't played with using a Makefile yet. I'll give that a shot. Is there a way to make ada-mode's Check syntax or Build commands dependent on a rule (i.e. generating the config file) in my Makefile? > If it doesn't work, please report bugs on the ada-mode mailing list (see > the above web site for subscription info); I'd like to enhance ada-mode > 5.1.8 to support this sort of thing. > > > The .cgpr file was created using gprconfig (I found this was how GPS > > works for an RTS project). > > I guess by "RTS project" you mean one for which you specify an alternate > run time system via the various --RTS options. ada-mode does not support > that directly (see above about Makefile :). > > I've been messing with that myself recently for Emacs, and have notes > about what needs to be added. There are several places where --RTS must > be specified on a command line, not just in a .gpr file. Also, it should > use the _correct_ system libraries as specified by the RTS setting, > not the default ones. Perhaps you can use gprbuild instead of gnatmake? Would that take care of it for you? Thanks for your help. Patrick