libsuricata-config: fix static library dependency order

When static linking we have a circular dependency between
libsuricata_rust, and libsuricata_c, so we have to list each twice.

An alternative is to use "-Wl,--start-group", but that isn't portable
outside the GNU toolchain.
pull/13125/head
Jason Ish 3 months ago committed by Victor Julien
parent 49f242b306
commit 272d6c8903

@ -6,8 +6,12 @@ includedir="@includedir@"
libdir="@libdir@"
LIBS="@LIBS@ @RUST_LDADD@"
# Shared library to link to (the default).
shared_lib="-lsuricata"
static_lib="-lsuricata_c -lsuricata_rust"
# Static libraries to link to. We duplicate these as there are
# circular references and --start-group is not portable.
static_lib="-lsuricata_c -lsuricata_rust -lsuricata_c -lsuricata_rust"
lib="$shared_lib"

Loading…
Cancel
Save