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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,170b136bef612224 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.224.88.200 with SMTP id b8mr22743078qam.8.1367665186840; Sat, 04 May 2013 03:59:46 -0700 (PDT) Path: y6ni7341qax.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nrc-news.nrc.ca!News.Dal.Ca!news.litech.org!news.stack.nl!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Specifying a target in a GPRBuild project file? Date: Fri, 26 Apr 2013 19:41:48 +0200 Organization: Ada @ Home Message-ID: References: <8f5e2358-05ab-4b0f-82be-b2f2d7438765@googlegroups.com> <51796066.5060906@obry.net> <85obd1zkfh.fsf@stephe-leake.org> NNTP-Posting-Host: ZOt+glEqAP8SwP/H/SQpKw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.15 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-26T19:41:48+02:00 List-Id: Le Fri, 26 Apr 2013 11:54:26 +0200, Stephen Leake = a =C3=A9crit: > Pascal Obry writes: > >> Le 25/04/2013 11:01, Yannick Duch=C3=AAne (Hibou57) a =C3=A9crit : >>> The `--target` option should only be used with explicit invocations = of >>> GPRConfig, not with GPRBuild. >> >> I fully disagree. I'm building many cross tools and always using >> gprbuild --target=3Dxyz. This is the way it should work, and if not >> probably a bug to report. > > +1 > > note that gprbuild will invoke gprconfig if necessary; gprbuild is the= > only tool a user needs to invoke directly. > GPRBuild invokes GPRConfig, without user interaction and acknowledgement= = from the user. If there are multiple compilers on the `$PATH`, the choi= ce = GPRConfig made may not be good. Also, by default GPRBuild invokes = GPRConfig each times, and if something changed in the `$PATH` or in the = = installed compilers, the configuration file may change and not for a goo= d = one. Using a `--config` option is deterministic. Or else a `--target` option if there is a matching `.cgpr` and i= t = is found by GPRBuild, but this one is just half deterministic, as if it = = don't find a `.cgpr`, it won't complain and will invoke GPRConfi= g. I agree with both of you, for the case you have one single compiler, whi= ch = is the most typical case. In this case which is simple, that's relevant = to = keep it simple. If there is more than one, an automatic configuration which change each = = time is less safe and what's more simple, is an explicit invocation of = GPRConfig, a validation of the configuration file and a re=E2=80=91use o= f the same = unchanged configuration file each time. I could not reproduce the case (I wanted to post an example), but I had = a = case of an automatic configuration using a compiler for a non=E2=80=91ma= tching = target (or there was two compilers for the same target? can't remember = exactly=E2=80=A6). -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity