]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: pass CC to to cargo
authorJason Ish <jason.ish@oisf.net>
Tue, 20 May 2025 20:41:13 +0000 (14:41 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 28 May 2025 17:08:05 +0000 (19:08 +0200)
This is required for crates that use a C compiler to use the same one as
used by Suricata. Important for cross compiling.

Also pass AR and RANLIB which are often used for cross compiling.

rust/Makefile.am

index 9a9828c34660a41aab1bea7867fa5348d8e6e9f8..a678b1e412a315d095b3385fb2c6674e1892acaa 100644 (file)
@@ -61,6 +61,7 @@ CARGO_ENV +=  LOCALSTATEDIR=$(e_localstatedir)
 all-local: Cargo.toml
        mkdir -p $(abs_top_builddir)/rust/gen
        cd $(abs_top_srcdir)/rust && \
+               CC="$(CC)" AR="$(AR)" RANLIB="$(RANLIB)"\
                $(CARGO_ENV) \
                $(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \
                        --features "$(RUST_FEATURES)" $(RUST_TARGET)