discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding a flag for the linker in a certain order


From: Dan Hitt
Subject: Re: adding a flag for the linker in a certain order
Date: Fri, 28 Sep 2012 08:04:32 -0700

On Fri, Sep 28, 2012 at 1:43 AM, Fred Kiefer <fredkiefer@gmx.de> wrote:
> Dan, the reason that you didn't get a reply from this mailing list may be
> because you didn't state clear enough what you are after. My impression is
> that ADDITIONAL_LDFLAGS is the wrong variable to use for whatever purpose
> you are after. Libraries should be specified by one of the
> ADDITIONAL_XXX_LIBS variables. But without knowing your specific problem it
> is hard to tell which one, probably ADDITIONAL_TOOL_LIBS.

Thanks Fred!!!

That sounds right, and i hope to try it this evening.

>
> Maybe you could read the documentation at:
>
> http://www.gnustep.org/resources/documentation/make_1.html

I looked at the info page (ubuntu 12.04).

Probably i just missed it, but if there's a difference between what
is in your url and what is in the ubuntu documentation package i'll
try to bring it up somehow.

>
> If this doesn't clear things up, feel free to post your full GNUmakefile.
>
> Hope this helps
> Fred
>

I think this helps a great deal, as i certainly want to conform to
normal usage unless there's some really definite reason not to.

Thanks again for your help to me, and for all you've done on
the gnustep project!!

>
> On 27.09.2012 22:30, Dan Hitt wrote:
>>
>> Just for reference here, some people on the gcc-help list
>> gave me a work-around for this issue.
>>
>> The work around is to link in the whole archive, via:
>>
>>
>> ADDITIONAL_LDFLAGS=-Wl,--whole-archive,/full/path/to/lib1.a,/full/path/to/lib2.a,...,--no-whole-archive
>>
>> Here, /full/path/to/lib1.a is a static library containing the same
>> symbols that i wanted to link in.
>>
>> But i would still like to be able to place my LDFLAGS anywhere i want
>> in the gnustep GNUmakefile, so if there is a way of doing that somebody
>> please let me know.
>>
>> (It would be better because it would be more natural and i could use the
>> -l abbreviation for libraries which is probably more portable.)
>>
>> So thanks in advance for any clues on that front, or maybe a pointer to
>> the docs (because maybe it's right there but i'm just looking over it??).
>>
>> dan
>>
>> On Wed, Sep 26, 2012 at 1:49 PM, Dan Hitt <dan.hitt@gmail.com> wrote:
>>>
>>> I'm building a command line program (using tool.make) and
>>> i need to add a library.
>>>
>>> I understand from the internet that in order to add a flag for
>>> the linker i use
>>>     ADDITIONAL_LDFLAGS=-lblahblahblah
>>>
>>> By using "make messages=yes" i can verify that indeed the
>>> extra library is getting added.
>>>
>>> But it is getting added to the front of the list, while it needs
>>> to be added to the end of the list in order to get all the
>>> symbols resolved.  (If i manually form the command by
>>> moving the library from the first place on the list to the
>>> last place i have verified that all symbols indeed resolve
>>> if the library is placed last.)
>>>
>>> So . . . what should i do to get my linker argument to the
>>> end of the list?
>>>
>>> Thanks in advance for any clues or pointers.
>>>
>>> dan
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]