comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent <vcelier@gmail.com>
Subject: Re: Controlling the linking of shared libraries
Date: Tue, 26 Jul 2011 02:20:43 -0700 (PDT)
Date: 2011-07-26T02:20:43-07:00	[thread overview]
Message-ID: <3b1702a7-c533-40a8-ad8e-a01cd083f948@m6g2000prh.googlegroups.com> (raw)
In-Reply-To: 98r7sbFs66U1@mid.individual.net

> 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



  parent reply	other threads:[~2011-07-26  9:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 18:01 Controlling the linking of shared libraries Björn Persson
2011-07-21 23:14 ` anon
2011-07-22  6:36 ` Stephen Leake
2011-07-22 23:50   ` Simon Wright
2011-07-24 11:08 ` Björn Persson
2011-07-24 18:03   ` anon
2011-07-24 19:07   ` Project file version: was " anon
2011-07-24 19:13   ` Simon Wright
2011-07-25  1:05     ` anon
2011-07-26  8:18     ` Björn Persson
2011-07-25 11:43   ` Stephen Leake
2011-07-25 12:06     ` Simon Wright
2011-07-25 12:29       ` Dmitry A. Kazakov
2011-07-26  8:19     ` Björn Persson
2011-07-28 10:18       ` Stephen Leake
2011-07-29 22:47         ` Vincent
2011-07-26  9:20 ` Vincent [this message]
2011-07-26 23:37   ` Björn Persson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox