]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: separate the rust lib from RUST_LDADD
authorJason Ish <jason.ish@oisf.net>
Wed, 10 Feb 2021 20:30:38 +0000 (14:30 -0600)
committerJason Ish <jason.ish@oisf.net>
Tue, 16 Feb 2021 17:43:26 +0000 (11:43 -0600)
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
src/Makefile.am

index 6c077785c9398ec01f75551852b5c58e01e73fe8..8aaf4a66d0d9da377edbd2cfefc9e4219e39b1f7 100644 (file)
@@ -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)
index 6be971733a58977296834674b3729c384fd59f60..5ccb669f111e1c386fc85cb970292179ae8ba786 100755 (executable)
@@ -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)