[Top][All Lists]

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

bug#11089: LINK determination

From: Peter Breitenlohner
Subject: bug#11089: LINK determination
Date: Wed, 28 Mar 2012 13:30:52 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Tue, 27 Mar 2012, Stefano Lattarini wrote:

[Adding automake-patches]

Reference: <http://debbugs.gnu.org/11089>

On Sun, Mar 25, 2012 at 11:20 AM, Stefano Lattarini wrote:

I'd describe this as an automake limitation; not sure if it's worth
fixing (since yours is not a common use case, and the issue you're
facing has a simple-enough workaround, as you've already found out);
but it would be worth documenting IMHO.

this situation is actually more common than one might think.  E.g., the
Makefile.am for gnuplot-4.6.0/src/ contains
        gnuplot_SOURCES = alloc.c ETC.
        gnuplot_SOURCES += wxterminal/wxt_gui.cpp
but that actually ought to be
        gnuplot_SOURCES = alloc.c ETC.
        gnuplot_SOURCES += wxterminal/wxt_gui.cpp
        gnuplot_LINK = $(CXXLINK)
        gnuplot_LINK = $(LINK)

On a second thought, I've been unable to find a way to document Jason's
workaround that doesn't sound cumbersome and clumsy; so maybe it's better
to just drop this documentation change.

Still, having a test case verifying that such a workaround actually works
is still worthwhile and easy to do.  This is what the attached patch does.
I will push it this evening or tomorrow if there is no objection.

the workaround described earlier in this thread and used in the test case:
        if HAVE_CXX
        foo_LINK = $(CXXLINK)
        foo_LINK = $(LINK)
works nicely and is simple enough when not using libtool libraries.  When
linking foo with (installed or uninstalled) libtool libraries, the default
definition of foo_LINK generated by Automake would be something like
                --mode=link $(CXXLD) $(foo_CXXFLAGS) $(CXXFLAGS) \
                $(foo_LDFLAGS) $(LDFLAGS) -o $@
and a more elaborate workaround is needed.

What is the best way to handle this situation?  An additional test case?

Peter Breitenlohner <address@hidden>

reply via email to

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