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,4a64008f049d9bb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 X-Received: by 10.68.83.104 with SMTP id p8mr4857906pby.0.1366680425145; Mon, 22 Apr 2013 18:27:05 -0700 (PDT) Path: bp1ni342pbd.1!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!news.glorb.com!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 an `--RTS` option in a GPR file, for a runtime library Date: Tue, 23 Apr 2013 03:26:58 +0200 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: MElZi/LkXjdV3cIyylAczw.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 X-Received-Bytes: 3612 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-04-23T03:26:58+02:00 List-Id: Le Sun, 14 Apr 2013 21:54:20 +0200, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > If in the test project file I specify an absolute path like with > > Switches :=3D > ("-s", > "--RTS=3D//runtime"); > > I get this message from `gprbuild`: =E2=80=9Cwarning: RTS for language= ada is = > discarded (full path)=E2=80=9D. Well, it compiles the test project, bu= t `ldd` = > shows it does not use the expected runtime. The runtime was wrong, and was discarded fro this reason, but GPRBuild d= id = 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 :=3D > ("-s", > "--RTS=3Druntime"); > > I get this message from `gprbuild`: =E2=80=9Cwarning: no compiler spec= ified for = > language "Ada", ignoring all its sources=E2=80=9D then below =E2=80=9C= "test" is not a = > source of project "test" gprbuild: problems with main sources=E2=80=9D= , 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 =E2=80=9Cno compiler s= pecified = for language Ada=E2=80=9D. > I can't understand what's wrong, according to > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gnat_ugn_unw/Switches-for-gnat= make.html > it should works as follow: > > (documentations says) >> --RTS=3Drts-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): >> >> /$rts_path >> /$rts_path >> /rts-$rts_path > The path is either absolute or relative to the build directory. The = erroneously named =E2=80=9Ccurrent directory=E2=80=9D is not the one fro= m 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 th= e = project file (the documentation is not very clear with this). Last but not least, the `--RTS=3D=E2=80=A6` option, has to be given in t= he Binder = package, not the Builder package. -- = =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