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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b43af03023b41f76 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news.germany.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: pragma Linker_Options (was: JEWL on XP?) Date: Mon, 10 Nov 2008 19:14:27 -0600 Organization: Jacob's private Usenet server Message-ID: References: <5sMRk.427973$yE1.118321@attbi_s21> <491807ee$0$31337$9b4e6d93@newsspool4.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1226366071 19436 69.95.181.76 (11 Nov 2008 01:14:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 11 Nov 2008 01:14:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news2.google.com comp.lang.ada:8375 Date: 2008-11-10T19:14:27-06:00 List-Id: "Georg Bauhaus" wrote in message news:491807ee$0$31337$9b4e6d93@newsspool4.arcor-online.net... > Jeffrey R. Carter schrieb: > >> Depending on your compiler, you may need to convert the single "pragma >> Linker_Options" into multiple, one for each item in the single one. > > So, pragma Linker_Options can be troublesome in case one > cannot change the Ada source files. (Because whenever > a compilation system interprets the string_expression of the > pragma and the linker does not understand the string, > compilation fails.) Wouldn't it be better, in general, > to avoid system dependent pragma Linker_options in source > files? Well, maybe, but then you potentially lose version control on the options. And you might not have control over the building environment, but still need the options given. For instance, in Claw, we have a package with separate bodies for each compiler. Some of those bodies contain one or more Linker_Option pragmas. If they're not given, Claw won't work (usually with a completely mysterious error message). We don't provide build scripts with Claw (the various compilers have fine mechanisms for that, we don't need to duplicate that). So pragma Linker_Options is the only way to ensure that the correct options are used. I'd expect issues like these to arise for any "binding" packages that are distributed separately (assuming that you need facilities beyond those provided with the core OS). Similar reasons arise as to why you might want to use configuration pragmas rather than compiler options to suppress checks and the like. Randy.