[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using .la or .a when linking an executable ?
From: |
Ralf Wildenhues |
Subject: |
Re: using .la or .a when linking an executable ? |
Date: |
Mon, 29 Sep 2008 22:09:56 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Vincent Torri wrote on Mon, Sep 29, 2008 at 09:47:02PM CEST:
> * Ralf Wildenhues wrote:
>> * Vincent Torri wrote on Sun, Sep 28, 2008 at 01:04:44PM CEST:
>>
>>> 2) If he is right, what should I do to remove those "dependencies" ?
>>> (flag to pass in a variable in my Makefile.am, or something like that)
>>
>> You can pass -Wl,--as-needed when the linker is the GNU binutils one.
>> But beware that it may break things with some compilers (notably C++
>> ones), with some apps that do dlopen and expect dependencies to be
> present, and did not work right in some older versions of ld.
>
> Do you have an idea if:
>
> * it works on Windows (mingw binutils) ?
No. I wouldn't even know that indirect deps work on w32, or whether
they help there.
> * from which version of ld it is safe to use that flag ?
Look at the gnulib module lib-ignore, for a pointer for more
information, and a macro to use --as-needed when possible.
Cheers,
Ralf