comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Specifying a target in a GPRBuild project file?
Date: Fri, 26 Apr 2013 19:41:48 +0200
Date: 2013-04-26T19:41:48+02:00	[thread overview]
Message-ID: <op.wv5sryvuule2fv@cardamome> (raw)
In-Reply-To: 85obd1zkfh.fsf@stephe-leake.org

Le Fri, 26 Apr 2013 11:54:26 +0200, Stephen Leake  
<stephen_leake@stephe-leake.org> a écrit:

> Pascal Obry <pascal@obry.net> writes:
>
>> Le 25/04/2013 11:01, Yannick Duchêne (Hibou57) a écrit :
>>> 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=xyz. 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 choice  
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 good  
one.

Using a `--config` option is deterministic.

Or else a `--target` option if there is a matching `<target>.cgpr` and it  
is found by GPRBuild, but this one is just half deterministic, as if it  
don't find a `<target>.cgpr`, it won't complain and will invoke GPRConfig.

I agree with both of you, for the case you have one single compiler, which  
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‑use of 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‑matching  
target (or there was two compilers for the same target? can't remember  
exactly…).


-- 
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University



  reply	other threads:[~2013-04-26 17:41 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  7:46 Specifying a target in a GPRBuild project file? Yannick Duchêne (Hibou57)
2013-04-23  8:09 ` Yannick Duchêne (Hibou57)
2013-04-23 11:37   ` Yannick Duchêne (Hibou57)
2013-04-23 14:04     ` Yannick Duchêne (Hibou57)
2013-04-23 15:17       ` Yannick Duchêne (Hibou57)
2013-04-23 19:14         ` sbelmont700
2013-04-25  9:01           ` Yannick Duchêne (Hibou57)
2013-04-25 16:57             ` Pascal Obry
2013-04-25 19:02               ` Dmitry A. Kazakov
2013-04-26 16:09                 ` Pascal Obry
2013-04-26 17:51                   ` Yannick Duchêne (Hibou57)
2013-04-26 18:32                   ` Dmitry A. Kazakov
2013-04-26 18:52                     ` Pascal Obry
2013-04-27  6:05                       ` Dmitry A. Kazakov
2013-04-27  8:37                         ` Yannick Duchêne (Hibou57)
2013-04-27  8:48                           ` Dmitry A. Kazakov
2013-04-27 13:32                             ` Georg Bauhaus
2013-04-27 16:57                               ` Yannick Duchêne (Hibou57)
2013-04-27 18:30                                 ` Georg Bauhaus
2013-04-27 21:20                                   ` Yannick Duchêne (Hibou57)
2013-04-28  6:47                                     ` Gour
2013-04-28  8:11                                       ` Dmitry A. Kazakov
2013-04-28 12:56                                         ` Gour
2013-04-28 14:52                                           ` Dmitry A. Kazakov
2013-04-28 16:03                                             ` Simon Wright
2013-04-28 19:09                                             ` Gour
2013-04-28  7:21                                     ` Simon Wright
2013-04-27 19:34                                 ` Simon Wright
2013-04-26 19:09                     ` sbelmont700
2013-04-27  6:17                       ` Dmitry A. Kazakov
2013-04-27  7:45                         ` Pascal Obry
2013-04-27  8:36                           ` Dmitry A. Kazakov
2013-04-27  8:43                         ` Yannick Duchêne (Hibou57)
2013-04-26 19:31                     ` Yannick Duchêne (Hibou57)
2013-04-27  7:45                       ` Pascal Obry
2013-04-26  9:54               ` Stephen Leake
2013-04-26 17:41                 ` Yannick Duchêne (Hibou57) [this message]
2013-04-28  2:09                   ` Stephen Leake
2013-04-25 21:00             ` sbelmont700
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox