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: Aggregate GPRs Date: Mon, 31 Aug 2015 14:39:45 +0100 Organization: A noiseless patient Spider Message-ID: References: <86twrf63cw.fsf@stephe-leake.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="0903b4fccd19524a858dd481bbd547d7"; logging-data="32547"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19cRr0lO4vwtEx0yQNuEe7ucax8cEQ/uDo=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:WNl0So1owqq/24DB3BAbXG4nR0E= sha1:jXr516KGIMMnXyH+nv2r5N5p9G0= Xref: news.eternal-september.org comp.lang.ada:27650 Date: 2015-08-31T14:39:45+01:00 List-Id: Stephen Leake writes: > Simon Wright writes: > >> I see from the documentation[1] that, for projects built through the >> aggregate project, package Builder is ignored > > The section you reference does not say this; did you find it elsewhere? > > It does say the specific attribute Global_Compilation_Switches is > ignored in standard projects, since it is overridden by the value given > in the aggregate project. Just before section 2.8 (that might be 5.8 in your version???), it says "For projects that are built through the aggregate, the package Builder is ignored, except for the Executable attribute which specifies the name of the executables resulting from the link of the main programs, and for the Executable_Suffix." >> (even if the aggregate project doesn't have a package Builder?). >> >> I've just found (with GPRBUILD GPL 2015) that the attributes Target >> and Runtime are also ignored! > > In GNAT 2015 gnat_ugn.info, Target and Runtime are listed in setcion > 5.9.10.1 as Project Level Configuration attributes. So they are not in > package Builder. No, nor are they in my GPR; just as a demo, I have project Testbed is for Main use ("testbed.adb"); for Object_Dir use ".build"; for Source_Dirs use (".", "../test-common"); for Exec_Dir use "."; for Target use "arm-eabi"; for Runtime ("ada") use Testbed'Project_Dir & "../arduino-due"; package Builder is ... and aggregate project Agg is for Project_Files use ("testbed.gpr"); end Agg; resulting in $ gprbuild -P agg gcc -c -gnatqQafoy -gnatwaL.X testbed.adb testbed.adb:41:06: file "start_freertos_scheduler.ads" not found because it's using the wrong compiler, the wrong RTS (and the wrong options, but at least ignoring package Builder is documented). > Section 5.9.10 says configuration attributes are "usually found only in > configuration project files". "usually"? Clearly some missing use-case documentation here! > I'm fully aware that the documentation for gprbuild often differs from > what gprbuild actually does, but did you put these attributes in a > config project file in your testing? The auto-generated auto.cgpr has a hair-raising amount of detail, so no, I didn't. But you are right that if I copy .build/auto.cgpr to ./default.cgpr the correct compiler is chosen. >> These features seem to me to reduce the usefulness of aggregate >> projects to the point of uselessness. Does anyone have positive >> experiences with them? > > I've only used aggregrate projects to specify project_path; I find > that very useful. I was trying to specify a scenario variable. The result was that gprbuild used the native compiler rather than the target!