From 2c5e1d6a6d4f89a4a8251faf30ea8c1337452912 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 10 Feb 2021 14:30:38 -0600 Subject: [PATCH] rust: separate the rust lib from RUST_LDADD Fix another issue with library ordering when breaking apart LDFLAGS from LIBS for outputting usable command lines for users of a Suricata library. RUST_LDADD should just contain the extra libs required by Rust, not the actual Suricata Rust library. --- configure.ac | 1 - src/Makefile.am | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6c077785c9..8aaf4a66d0 100644 --- a/configure.ac +++ b/configure.ac @@ -2404,7 +2404,6 @@ fi fi RUST_SURICATA_LIB="${RUST_SURICATA_LIBDIR}/${RUST_SURICATA_LIBNAME}" - RUST_LDADD="${RUST_SURICATA_LIB} ${RUST_LDADD}" CFLAGS="${CFLAGS} -I\${srcdir}/../rust/gen -I\${srcdir}/../rust/dist" AC_SUBST(RUST_SURICATA_LIB) AC_SUBST(RUST_LDADD) diff --git a/src/Makefile.am b/src/Makefile.am index 6be971733a..5ccb669f11 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -592,7 +592,7 @@ suricata_SOURCES = main.c # the library search path. suricata_LDFLAGS = $(all_libraries) ${SECLDFLAGS} -suricata_LDADD = libsuricata_c.a $(HTP_LDADD) $(RUST_LDADD) +suricata_LDADD = libsuricata_c.a $(RUST_SURICATA_LIB) $(HTP_LDADD) $(RUST_LDADD) suricata_DEPENDENCIES = libsuricata_c.a if BUILD_SHARED_LIBRARY @@ -628,7 +628,7 @@ uninstall-local: if BUILD_FUZZTARGETS LDFLAGS_FUZZ = $(all_libraries) $(SECLDFLAGS) -LDADD_FUZZ = libsuricata_c.a $(HTP_LDADD) $(RUST_LDADD) +LDADD_FUZZ = libsuricata_c.a $(RUST_SURICATA_LIB) $(HTP_LDADD) $(RUST_LDADD) nodist_fuzz_applayerprotodetectgetproto_SOURCES = tests/fuzz/fuzz_applayerprotodetectgetproto.c fuzz_applayerprotodetectgetproto_LDFLAGS = $(LDFLAGS_FUZZ)