[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #30060] messed up LDFLAGS and LIBADD for libgettextpo and libgettex
From: |
Bruno Haible |
Subject: |
[bug #30060] messed up LDFLAGS and LIBADD for libgettextpo and libgettextsrc |
Date: |
Mon, 13 Feb 2023 07:22:03 -0500 (EST) |
Update of bug #30060 (project gettext):
Status: In Progress => Not a Bug
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #4:
> The correct command when linking libraries should be:
> $(CC) $(LDFLAGS) $(OBJECTS) $(LIBADD)
> Putting some LIBS into LDFLAGS will lead to the fact that LIBS appearing
prior to OBJECTS.
No one puts static libraries into $(LDFLAGS). If they are needed by all
programs, they belong in $(LIBS).
When the target is a non-libtool library, library.a, there is no
$(library_a_LDFLAGS) variable; the link dependencies simply get ignored when
creating a .a file.
When the target is a libtool library, library.la, the value of
$(library_la_LDFLAGS) gets used in a libtool command line, before the objects.
This is OK, because as Ralf Wildenhues wrote in
https://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00146.html: "libtool
will reorder the command line so that `-l' flags appear after all encountered
objects."
And the objects appear before $(library_la_LIBADD) and $(LIBS); this is
necessary for static linking.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?30060>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #30060] messed up LDFLAGS and LIBADD for libgettextpo and libgettextsrc,
Bruno Haible <=