[Top][All Lists]

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

Re: Automake passing CFLAGS or CXXFLAGS when linking

From: Grégory Pakosz
Subject: Re: Automake passing CFLAGS or CXXFLAGS when linking
Date: Sat, 2 Jul 2016 09:05:02 +0200

Thanks for the reply Bob.

Well I indeed copy pasted from a Libtoolized project (by mistake) but
first I noticed CFLAGS and CXXFLAGS where used when linking in a plain
Automake project:



Also, as far as I can tell, Libtool filters flag only when linking
shared libraries.


On Fri, Jul 1, 2016 at 3:33 PM, Bob Friesenhahn
<address@hidden> wrote:
> On Tue, 28 Jun 2016, Grégory Pakosz wrote:
>> Hello,
>> What's the rationale behind Automake passing CFLAGS or CXXFLAGS when
>> linking?
>> LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
>>  $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
>>  $(AM_LDFLAGS) $(LDFLAGS) -o $@
> Notice that these lines all start with $(LIBTOOL).  Libtool will normally
> discard flags not needed for linking.  It is common for libtool to link
> using the C compiler when possible and so the C compiler can also
> use/discard options as needed.
> Bob
> --
> Bob Friesenhahn
> address@hidden,
> GraphicsMagick Maintainer,

reply via email to

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