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: gprbuild fun Date: Sun, 28 Jun 2015 21:08:43 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="c762050aff3a30866fa7e79999b14776"; logging-data="440"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sMEBdre4ByILnXAuAl1bwiKN+11/r2zw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:omGisVLq7xmXgPW6rUmUHNBU4hE= sha1:B1n/xLBmJh4kCQCEo4OpXpGtK4o= Xref: news.eternal-september.org comp.lang.ada:26516 Date: 2015-06-28T21:08:43+01:00 List-Id: "Dmitry A. Kazakov" writes: > On Sun, 28 Jun 2015 18:28:13 +0100, Simon Wright wrote: > >> I have a mixed-language GPR like >> >> project build is >> for languages use ("ada", "c"); >> for source_files use ("a.adb", "c.c"); >> package ide is >> for compiler_command ("ada") use "gnatmake"; >> end ide; >> end build; >> >> (I have no idea why I introduced the compiler_command setting on >> 2014-05-01, and I have no idea why the issue has only just surfaced) I suppose I've only had arm-eabi-gcc on the path fairly recently, so there wouldn't've been a cross-compiler to confuse matters. >> and, if I have the native gcc and arm-eabi-gcc present in the PATH, >> gprbuild chooses to use the native gcc for the Ada part and arm-eabi-gcc >> for the C part! >> >> Fix: delete the compiler_command line. > > Under Fedora ARM gprbuild is broken (wrong target). The fix is to rename it > to /usr/bin/gprbuild.old and use > > #!/bin/sh > gprbuild.old --target=armv7hl-redhat-linux-gnueabi $* > > instead. It is a pity that gnatmake is going to be ditched. In this case, I could alternatively have invoked gprbuild with --target=x86_64-apple-darwin13. But it shouldn't've been necessary! I'm still quite baffled as to exactly where in the source gprbuild invokes gprconfig with --target=all to cause the effect I saw. I suppose it might just call it as a library.