From: Simon Wright <simon@pushface.org>
Subject: Re: Question about GNAT gprconfig
Date: Sun, 06 Mar 2016 11:17:14 +0000
Date: 2016-03-06T11:17:14+00:00 [thread overview]
Message-ID: <ly8u1vq2it.fsf@pushface.org> (raw)
In-Reply-To: 704c1384-c3d9-440c-a65f-9c0741306b85@googlegroups.com
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.
next prev parent reply other threads:[~2016-03-06 11:17 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 [this message]
2016-03-06 22:26 ` Zack Boll
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