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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,df7cea30536a085f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m6g2000prh.googlegroups.com!not-for-mail From: Vincent Newsgroups: comp.lang.ada Subject: Re: Controlling the linking of shared libraries Date: Tue, 26 Jul 2011 02:20:43 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3b1702a7-c533-40a8-ad8e-a01cd083f948@m6g2000prh.googlegroups.com> References: <98r7sbFs66U1@mid.individual.net> NNTP-Posting-Host: 96.49.239.138 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1311672149 1850 127.0.0.1 (26 Jul 2011 09:22:29 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 26 Jul 2011 09:22:29 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m6g2000prh.googlegroups.com; posting-host=96.49.239.138; posting-account=XHo7VAoAAAB1JyNIfjfwRtudGRuTxr85 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0.1) Gecko/20100101 Firefox/5.0.1,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:21329 Date: 2011-07-26T02:20:43-07:00 List-Id: > Does anyone know how to pass command line parameters to Gnatmake and > GPRbuild that they should forward to gcc when they invoke gcc as a linker to > build a shared library? -largs seems to be used only when a program is > linked. When a shared library is linked it seems to be ignored. There are no command line options directly available for this. You need to specify the following attributes in the shared library project file. Library_Options: This attribute may be used to specify additional switches (last switches) when linking a shared library. Leading_Library_Options: This attribute, that is taken into account only by gprbuild, may be used to specified leading options (first switches) when linking a shared library. However, if you specify the value of one of these attribute with an external_as_list, you will be able to specify library options with a switch -X. Example: project Prj is for Library_Name use "prj"; for Library_Dir use "lib"; for Library_Kind use "relocatable"; for Library_Options use external_as_list ("LOPTS", ","); end Prj; $ gprbuild -P prj.gpr "-XLOPTS=-v,-v" -- Vincent