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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,99e88d5f39f38483 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.93.MISMATCH!xlned.com!feeder7.xlned.com!news2.euro.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: GprBuild and linker options Date: Tue, 19 Jul 2011 05:59:58 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: <30764c54-0e96-4394-9a5c-d742adbc5344@glegroupsg2000goo.googlegroups.com> Reply-To: anon@anon.org NNTP-Posting-Host: ilpa7cWH+q+UR1a+iQw+JQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news1.google.com comp.lang.ada:20225 Date: 2011-07-19T05:59:58+00:00 List-Id: try adding "-largs " to the end of the command line example: GprBuild -largs --Link=ld In <30764c54-0e96-4394-9a5c-d742adbc5344@glegroupsg2000goo.googlegroups.com>, Felix Krause 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