Fix linking order to work when linked with --as-needed.
authorNeal H. Walfield <neal@gnu.org>
Wed, 13 May 2015 19:47:11 +0000 (21:47 +0200)
committerNeal H. Walfield <neal@gnu.org>
Wed, 13 May 2015 19:47:11 +0000 (21:47 +0200)
* curses/Makefile.am (LDADD): Add $(COMMON_LIBS) after all of the
local objects and object archives.
* gnome3/Makefile.am (LDADD): Likewise.
* gtk+-2/Makefile.am (LDADD): Likewise.
* qt4/Makefile.am (pinentry_qt4_LDADD): Likewise.
* tty/Makefile.am (LDADD): Likewise.

Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
curses/Makefile.am
gnome3/Makefile.am
gtk+-2/Makefile.am
qt4/Makefile.am
tty/Makefile.am

index e8ea031..4d764c7 100644 (file)
@@ -22,9 +22,8 @@
 bin_PROGRAMS = pinentry-curses
 
 AM_CPPFLAGS = $(COMMON_CFLAGS) $(NCURSES_INCLUDE) -I$(top_srcdir)/pinentry
-LDADD = $(COMMON_LIBS) \
-       ../pinentry/libpinentry.a ../pinentry/libpinentry-curses.a \
+LDADD = ../pinentry/libpinentry.a ../pinentry/libpinentry-curses.a \
        ../assuan/libassuan.a ../secmem/libsecmem.a \
-       $(LIBCAP) $(LIBCURSES) $(LIBICONV)
+       $(COMMON_LIBS) $(LIBCAP) $(LIBCURSES) $(LIBICONV)
 
 pinentry_curses_SOURCES = pinentry-curses.c
index 78df706..46639de 100644 (file)
@@ -32,8 +32,7 @@ endif
 AM_CPPFLAGS = $(COMMON_CFLAGS) $(GNOME3CFLAGS) \
        $(ncurses_include) -I$(top_srcdir)/assuan \
        -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
-LDADD = $(COMMON_LIBS) \
-       ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
-       $(LIBCAP) $(GNOME3LIBS) $(libcurses)
+LDADD = ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
+       $(COMMON_LIBS) $(LIBCAP) $(GNOME3LIBS) $(libcurses)
 
 pinentry_gnome3_SOURCES = pinentry-gnome3.c
index c98139f..7e37469 100644 (file)
@@ -31,9 +31,8 @@ endif
 
 AM_CPPFLAGS = $(COMMON_CFLAGS) $(GTK2CFLAGS) $(ncurses_include) \
        -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry
-LDADD = $(COMMON_LIBS) \
-       ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
-       $(LIBCAP) $(GTK2LIBS) $(libcurses)
+LDADD = ../pinentry/libpinentry.a ../assuan/libassuan.a ../secmem/libsecmem.a \
+       $(COMMON_LIBS) $(LIBCAP) $(GTK2LIBS) $(libcurses)
 
 pinentry_gtk_2_SOURCES = pinentry-gtk-2.c \
        gtksecentry.c gtksecentry.h gseal-gtk-compat.h
index 31274bb..816aade 100644 (file)
@@ -38,10 +38,10 @@ AM_CPPFLAGS = $(COMMON_CFLAGS) \
        -I$(top_srcdir) -I$(top_srcdir)/assuan -I$(top_srcdir)/secmem \
        $(ncurses_include) -I$(top_srcdir)/pinentry
 AM_CXXFLAGS = $(QT4_CORE_CFLAGS) $(QT4_GUI_CFLAGS)
-pinentry_qt4_LDADD = $(COMMON_LIBS) \
-       $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) \
+pinentry_qt4_LDADD = \
        ../pinentry/libpinentry.a $(top_builddir)/assuan/libassuan.a \
-       $(top_builddir)/secmem/libsecmem.a $(LIBCAP)
+       $(top_builddir)/secmem/libsecmem.a \
+       $(COMMON_LIBS) $(QT4_CORE_LIBS) $(QT4_GUI_LIBS) $(libcurses) $(LIBCAP)
 
 BUILT_SOURCES = \
        pinentryconfirm.moc qsecurelineedit.moc pinentrydialog.moc
index 798c08f..aa805b2 100644 (file)
@@ -21,8 +21,8 @@
 bin_PROGRAMS = pinentry-tty
 
 AM_CPPFLAGS = $(COMMON_CFLAGS) -I$(top_srcdir)/pinentry
-LDADD = $(COMMON_LIBS) ../pinentry/libpinentry.a \
+LDADD = ../pinentry/libpinentry.a \
        ../assuan/libassuan.a ../secmem/libsecmem.a \
-       $(LIBCAP) $(LIBICONV)
+       $(COMMON_LIBS) $(LIBCAP) $(LIBICONV)
 
 pinentry_tty_SOURCES = pinentry-tty.c