From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Re: Specifying an `--RTS` option in a GPR file, for a runtime library
Date: Tue, 23 Apr 2013 03:26:58 +0200
Date: 2013-04-23T03:26:58+02:00 [thread overview]
Message-ID: <op.wvyzm8hdule2fv@cardamome> (raw)
In-Reply-To: op.wvjqwuofule2fv@cardamome
Le Sun, 14 Apr 2013 21:54:20 +0200, Yannick Duchêne (Hibou57)
<yannick_duchene@yahoo.fr> a écrit:
> If in the test project file I specify an absolute path like with
>
> Switches :=
> ("-s",
> "--RTS=/<dir>/runtime");
>
> I get this message from `gprbuild`: “warning: RTS for language ada is
> discarded (full path)”. Well, it compiles the test project, but `ldd`
> shows it does not use the expected runtime.
The runtime was wrong, and was discarded fro this reason, but GPRBuild did
not say it clearly, and instead, made a misleading reference to a full
path, although using a full path was not the reason.
> If in the test project file I specify a relative path like with
>
> Switches :=
> ("-s",
> "--RTS=runtime");
>
> I get this message from `gprbuild`: “warning: no compiler specified for
> language "Ada", ignoring all its sources” then below “"test" is not a
> source of project "test" gprbuild: problems with main sources”, and the
> compilation fails.
That was because I messed up somethings: the target for this runtime
source was not the same as the target of the compiler used, and GPRBuild
did not found a compiler for the target, thus the “no compiler specified
for language Ada”.
> I can't understand what's wrong, according to
> http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gnat_ugn_unw/Switches-for-gnatmake.html
> it should works as follow:
>
> (documentations says)
>> --RTS=rts-path
>> Specifies the default location of the runtime library.GNAT looks for
>> the runtime in the following directories,and stops as soon as a valid
>> runtime is found (adaincludeor ada_source_path, and adalib or
>> ada_object_path present):
>>
>> <current directory>/$rts_path
>> <default-search-dir>/$rts_path
>> <default-search-dir>/rts-$rts_path
>
The path is either absolute or relative to the build directory. The
erroneously named “current directory” is not the one from which GPRBuild
is invoked nor the directory containing the project file, that's the one
to which GPRBuild switches, which is the build directory specified in the
project file (the documentation is not very clear with this).
Last but not least, the `--RTS=…` option, has to be given in the Binder
package, not the Builder package.
--
“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
next prev parent reply other threads:[~2013-04-23 1:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 19:54 Specifying an `--RTS` option in a GPR file, for a runtime library Yannick Duchêne (Hibou57)
2013-04-14 20:07 ` Yannick Duchêne (Hibou57)
2013-04-14 20:36 ` Yannick Duchêne (Hibou57)
2013-04-15 8:19 ` Brian Drummond
2013-04-15 11:22 ` Yannick Duchêne (Hibou57)
2013-04-15 22:28 ` Yannick Duchêne (Hibou57)
2013-04-17 11:43 ` Brian Drummond
2013-04-18 22:10 ` Yannick Duchêne (Hibou57)
2013-04-15 13:27 ` Yannick Duchêne (Hibou57)
2013-04-15 13:29 ` Yannick Duchêne (Hibou57)
2013-04-23 1:26 ` Yannick Duchêne (Hibou57) [this message]
2013-04-23 17:22 ` Yannick Duchêne (Hibou57)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox