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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Question about GNAT gprconfig Date: Sun, 06 Mar 2016 11:17:14 +0000 Organization: A noiseless patient Spider Message-ID: References: <704c1384-c3d9-440c-a65f-9c0741306b85@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="900e1437335c90c92a3116ad49605f53"; logging-data="21344"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vvVhavEYbqcqDYnDYo0FrJ4pbEDEF+Zk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:jTUP/SlRclA3n4iFGGBXfGS6hnE= sha1:AZEfBRycPX4Bh9YLhazHwGfr2sw= Xref: news.eternal-september.org comp.lang.ada:29684 Date: 2016-03-06T11:17:14+00:00 List-Id: 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.