comp.lang.ada
 help / color / mirror / Atom feed
From: "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr>
Subject: Specifying an `--RTS` option in a GPR file, for a runtime library
Date: Sun, 14 Apr 2013 21:54:20 +0200
Date: 2013-04-14T21:54:20+02:00	[thread overview]
Message-ID: <op.wvjqwuofule2fv@cardamome> (raw)

Hi people once again,

I'm failing fixing an issue I have with a custom runtime.

First, the context:

   * I created a library project in a `runtime` directory;
   * It contains the directories `runtime/adalib` `runtime/adainclude` and  
`runtime/build`;
   * the library project file holds these attributes:

     for Library_Name use "gnat-4.6";
     for Library_Kind use "static";
     for Source_Dirs use ("runtime/adainclude");
     for Library_Dir use "runtime/adalib";
     for Object_Dir use "runtime/build";
     for Library_Version use "1";

Now I have a test project. I wanted to add an `--RTS` option in the  
Builder package, but the RTS seems to either be ignored (first case) or  
cause the compilation of the test project to fail (second case).

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.

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.

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

My test project resides in the directory containing the `runtime`  
directory, so the relative path should be OK. Anyway, it does not work  
neither with an absolute path, and the result is surprisingly different.

In your opinion, is this just a search path issue or is it something wrong  
with the runtime library? (which is unmodified so far).


-- 
“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-14 19:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-14 19:54 Yannick Duchêne (Hibou57) [this message]
2013-04-14 20:07 ` Specifying an `--RTS` option in a GPR file, for a runtime library 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)
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