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: a07f3367d7,99e88d5f39f38483 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: GprBuild and linker options References: Date: Wed, 20 Jul 2011 08:19:46 -0400 Message-ID: <82sjq19mal.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (windows-nt) Cancel-Lock: sha1:6chPI1uEPLDqmoRH3+CAXcQQsiY= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 878684e26c7e5e029e66117305 Xref: g2news1.google.com comp.lang.ada:20235 Date: 2011-07-20T08:19:46-04:00 List-Id: Felix Krause writes: >> Can you use "-framework=OpenCL"? > > No. > >> In the gcc manual, there is this: >> >> `-Xlinker OPTION' >> Pass OPTION as an option to the linker. You can use this to >> supply system-specific linker options which GCC does not know how >> to recognize. >> >> If you want to pass an option that takes an argument, you must use >> `-Xlinker' twice, once for the option and once for the argument. >> For example, to pass `-assert definitions', you must write >> `-Xlinker -assert -Xlinker definitions'. It does not work to write >> `-Xlinker "-assert definitions"', because this passes the entire >> string as a single argument, which is not what the linker expects. >> >> `-Wl,OPTION' >> Pass OPTION as an option to the linker. If OPTION contains >> commas, it is split into multiple options at the commas. >> >> either of these might work. > > While "-Xlinker OPTION" still has the same problems as before (the working directory will be prepended to OPTION), "-Wl,OPTION" works, as follows: > > for Linker_Options use ("-Wl,-framework,OpenCL"); > > Thanks a lot! Glad this helped. Now we just need to get the gcc manual improved to point out this difference. Or maybe it is gprbuild that is adding that directory. So much to do, so little time. Sigh. -- -- Stephe