comp.lang.ada
 help / color / mirror / Atom feed
From: anon@att.net
Subject: Re: GprBuild and linker options
Date: Tue, 19 Jul 2011 05:59:58 +0000 (UTC)
Date: 2011-07-19T05:59:58+00:00	[thread overview]
Message-ID: <j036gt$i5c$1@speranza.aioe.org> (raw)
In-Reply-To: 30764c54-0e96-4394-9a5c-d742adbc5344@glegroupsg2000goo.googlegroups.com

try adding "-largs <linker options>" to the end of the command line

example:
   GprBuild  <normal options> -largs --Link=ld    


In <30764c54-0e96-4394-9a5c-d742adbc5344@glegroupsg2000goo.googlegroups.com>, Felix Krause <fordprefect86@googlemail.com> writes:
>I need GprBuild to use a custom linker option (in this case, for linking ag=
>ainst an OSX framework). So I include this in my project file:
>
>package Linker is
>   for Linker_Options use ("-framework OpenCL", "-v");
>end Linker;
>
>When I try to build this project, this is the output I get at linking phase=
>, which fails:
>
>/usr/local/gnat/bin/gcc [...] -framework OpenCL -v [...]
>[...]
>COLLECT_GCC_OPTIONS=3D[...] '-framework OpenCL' '-v' [...]
> /usr/local/gnat/libexec/gcc/x86_64-apple-darwin10.2.0/4.5.3/collect2 [...]
>
>After that, I get a list of undefined symbols. This is due to "-framework O=
>penCL" not being given to the collect2 call. I have no idea what COMPILE_GC=
>C_OPTIONS does, but I noticed my switch being listed there. Now when I copy=
>paste the above call to /usr/local/gnat/bin/gcc into my shell and execute i=
>t there, my switch isn't listed in COLLECT_GCC_OPTIONS anymore, but instead=
> is given to the collect2 call, and everything links correctly.
>
>Now of course, I want the build to work directly without having to copy com=
>mands to the shell. One thing I tried is splitting the switch into two stri=
>ngs:
>
>for Linker_Options use ("-framework", "OpenCL", "-v");
>
>The linking phase now executes the following:
>
>/usr/local/gnat/bin/gcc [...] -framework /users/felix/projects/libs/opencla=
>da//OpenCL -v [...]
>
>This obviously results in an error because this framework can't be found. I=
> searched in the GprBuild user's guide for some hint on what causes this be=
>havior, but I didn't find anything. Can anyone tell me how to either make t=
>he GprBuild execution with "-framework OpenCL" work like when I execute it =
>in the shell, or prevent GprBuild from prepending the working path to "Open=
>CL" when passing two strings to Linker_Options?
>
>Thanks.
>Felix




  parent reply	other threads:[~2011-07-19  5:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-18 12:39 GprBuild and linker options Felix Krause
2011-07-18 20:32 ` Simon Wright
2011-07-18 22:51   ` Felix Krause
2011-07-19  5:59 ` anon [this message]
2011-07-19  8:20 ` Stephen Leake
2011-07-19 21:05   ` Felix Krause
2011-07-20 12:19     ` Stephen Leake
2011-07-19  9:14 ` Alex R. Mosteo
replies disabled

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