comp.lang.ada
 help / color / mirror / Atom feed
From: Zack Boll <zackboll@gmail.com>
Subject: Re: Question about GNAT gprconfig
Date: Sun, 6 Mar 2016 14:26:18 -0800 (PST)
Date: 2016-03-06T14:26:18-08:00	[thread overview]
Message-ID: <71bce85e-b7d7-4bf5-8e08-c119fcf3b949@googlegroups.com> (raw)
In-Reply-To: <ly8u1vq2it.fsf@pushface.org>

On Sunday, March 6, 2016 at 6:17:17 AM UTC-5, Simon Wright wrote:
> Zack Boll <zackboll@gmail.com> 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,
> 
> <?xml version="1.0" ?>
> <gprconfig>
>   <compiler_description>
>     <name>GNAT-PPC64</name>
>     <executable prefix="1">(powerpc64-e6500-linux-gnu-)?gnatmake</executable>
>     <version>
>       <external>${PREFIX}gnatls -v --version</external>
>       <grep regexp="^GNATLS.+?(\d+(\.\d+)?)" group="1"></grep>
>     </version>
>     <languages>Ada</languages>
>     <variable name="gcc_version">
>       <external>${PREFIX}gcc -v</external>
>       <grep regexp="^[-\w]*gcc \S+ (\S+)" group="1"></grep>
>     </variable>
>     <runtimes default="default,kernel,native">
>        <directory group="default" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/</directory>
>        <directory group="default" contents="^rts-">\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path</directory>
>        <directory group="2" >\.\./lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/</directory>
>        <directory group="1" >\.\./$TARGET/lib/gnat/(.*)/adalib/</directory>
>     </runtimes>
>     <target>
>       <external>${PREFIX}gcc -dumpmachine</external>
>       <grep regexp="[^\r\n]+"></grep>
>     </target>
>   </compiler_description>
> </gprconfig>
> 
> (not sure you need all of the <runtimes/> 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.


  reply	other threads:[~2016-03-06 22:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06  7:59 Question about GNAT gprconfig Zack Boll
2016-03-06  9:20 ` Dmitry A. Kazakov
2016-03-06 11:17 ` Simon Wright
2016-03-06 22:26   ` Zack Boll [this message]
2016-03-07  0:11     ` Zack Boll
2016-03-07  1:33       ` Zack Boll
2016-03-07  4:51         ` Zack Boll
2016-03-07  5:35           ` Zack Boll
2016-03-07  8:28             ` Dmitry A. Kazakov
2016-03-08  3:03               ` zackius
2016-03-08  8:43                 ` Dmitry A. Kazakov
2016-03-13  3:00                   ` Zack Boll
2016-03-07  8:31             ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox