From a47e8b6d4a21333b2d321b8dfabe61d28a39f175 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 29 Feb 2024 08:42:07 +0100 Subject: [PATCH] statd: fix library ordering for linker When building for cppcheck/coverity we may get a stupid linker that can wind up not finding, e.g., fexist() in libite (-lite) if it's not added last in the list of libraries. Signed-off-by: Joachim Wiberg --- src/statd/.gitignore | 1 + src/statd/Makefile.am | 8 ++++---- src/statd/configure.ac | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/statd/.gitignore b/src/statd/.gitignore index 9834c978..a92963a4 100644 --- a/src/statd/.gitignore +++ b/src/statd/.gitignore @@ -15,6 +15,7 @@ statd /config.sub /configure /depcomp +/.deps/ /install-sh /libtool /ltmain.sh diff --git a/src/statd/Makefile.am b/src/statd/Makefile.am index aad94587..72a36b35 100644 --- a/src/statd/Makefile.am +++ b/src/statd/Makefile.am @@ -7,7 +7,7 @@ sbin_PROGRAMS = statd statd_SOURCES = statd.c shared.c shared.h statd_CPPFLAGS = -D_DEFAULT_SOURCE -D_GNU_SOURCE statd_CFLAGS = -W -Wall -Wextra -statd_CFLAGS += $(jansson_CFLAGS) $(libite_CFLAGS) $(libyang_CFLAGS) -statd_CFLAGS += $(sysrepo_CFLAGS) $(libsrx_CFLAGS) -statd_LDADD = $(jansson_LIBS) $(libite_LIBS) $(libyang_LIBS) -statd_LDADD += $(sysrepo_LIBS) $(libsrx_LIBS) +statd_CFLAGS += $(jansson_CFLAGS) $(libyang_CFLAGS) $(sysrepo_CFLAGS) +statd_CFLAGS += $(libsrx_CFLAGS) $(libite_CFLAGS) +statd_LDADD = $(jansson_LIBS) $(libyang_LIBS) $(sysrepo_LIBS) +statd_LDADD += $(libsrx_LIBS) $(libite_LIBS) diff --git a/src/statd/configure.ac b/src/statd/configure.ac index 57648e46..cae62bc1 100644 --- a/src/statd/configure.ac +++ b/src/statd/configure.ac @@ -77,6 +77,8 @@ cat <