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.66.163.4 with SMTP id ye4mr14681810pab.23.1457303178710; Sun, 06 Mar 2016 14:26:18 -0800 (PST) X-Received: by 10.182.113.198 with SMTP id ja6mr200712obb.0.1457303178652; Sun, 06 Mar 2016 14:26:18 -0800 (PST) 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!hb3no12010199igb.0!news-out.google.com!pn7ni2249igb.0!nntp.google.com!ok5no6402389igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 6 Mar 2016 14:26:18 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.69.190.74; posting-account=LwEypwoAAAD5lknaw_JqkoK-tug0R26e NNTP-Posting-Host: 75.69.190.74 References: <704c1384-c3d9-440c-a65f-9c0741306b85@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <71bce85e-b7d7-4bf5-8e08-c119fcf3b949@googlegroups.com> Subject: Re: Question about GNAT gprconfig From: Zack Boll Injection-Date: Sun, 06 Mar 2016 22:26:18 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29688 Date: 2016-03-06T14:26:18-08:00 List-Id: On Sunday, March 6, 2016 at 6:17:17 AM UTC-5, Simon Wright wrote: > Zack Boll writes: > > > I recently built a GCC Ada cross-compiler for the PowerPC64 > > architecture using crosstool-ng. I can compile my Ada programs fine > > using powerpc64-e6500-linux-gnu-gnatmake but I have been unable to > > build with gprbuild and appropriate project files. I have traced this > > down to an issue with gprconfig not recognizing my compiler. > > > > When I run gprconfig --show-targets > > I get: > > arm-linux-gnueabihf (Raspberry Pi2 Cross Compiler downloaded from > > Adacores website) > > x86_64-linux-gnu > > > > But I don't see powerpc64-e6500-linux-gnu even though the compiler > > executable is in my path. Does anyone know what the issue might be? > > I think that gprconfig's compiler description file (at > $prefix/share/gprconfig/compilers.xml) doesn't recognise your target. > > You could edit that file directly; might be better to start by writing a > description just for your compiler, starting just from the GNAT section > at about line 687, > > > > > GNAT-PPC64 > (powerpc64-e6500-linux-gnu-)?gnatmake > > ${PREFIX}gnatls -v --version > > > Ada > > ${PREFIX}gcc -v > > > > \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/ > \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path > \.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/ > \.\./$TARGET/lib/gnat/(.*)/adalib/ > > > ${PREFIX}gcc -dumpmachine > > > > > > (not sure you need all of the section) and put this in > x-compilers.xml alongside the original compilers.xml (or locally, using > the gprbuild --db switch). > > You'll still need to specify --target=powerpc64-e6500-linux-gnu on the > command line, or for Target use "powerpc64-e6500-linux-gnu"; in your > GPR. > > If this works, you'll probably want to add sections for C, C++, ASM. Thanks, I was able to edit the existing GNAT line to support powerpc64-linux as a target. Hopefully I will be able to get C and C++ building correctly with gprbuild.