automake
[Top][All Lists]
Advanced

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

Re: Automake passing CFLAGS or CXXFLAGS when linking


From: Bob Friesenhahn
Subject: Re: Automake passing CFLAGS or CXXFLAGS when linking
Date: Fri, 1 Jul 2016 08:33:44 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

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, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


reply via email to

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