[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool links with g++ even with only c file
From: |
Ralf Wildenhues |
Subject: |
Re: libtool links with g++ even with only c file |
Date: |
Sat, 18 Apr 2009 19:33:32 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Vincent Torri wrote on Sat, Apr 18, 2009 at 07:13:11PM CEST:
> On Sat, 18 Apr 2009, Vincent Torri wrote:
>>> Anyway, you can work around it by setting foo_LINK.
>> ok, so it's just a matter of using the correct link options
>
> another question related to that. I have that following code:
>
> libevil_la_LDFLAGS = -no-undefined -Wl,--enable-auto-import -version-info
> @version_info@
>
> if EVIL_HAVE_WINCE
>
> libevil_la_LINK = $(LINK)
>
> else
>
> libevil_la_CXXFLAGS = -fno-rtti -fno-exceptions
> libevil_la_LINK = $(CXXLINK)
>
> endif
>
> But now, it seems that libevil_la_LDFLAGS is not taken into account
> anymore. What should I do ? pass its value to libevil_la_LINK ?
Ouch, I didn't think of that. Well, one thing you can do is to take out
the libevil_la_LINK variables again and look at how automake sets it;
use the same string to override them (it will include
$(libevil_la_LDFLAGS)). Arguably, this approach kind of exploits
internal Automake details.
Another option is to use convenience libraries to keep automake from
seeing the C++ file is described at the end of
<http://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html>
but I guess that will still require you to override _LINK for the case
where the C++ file is used.
Cheers,
Ralf