1From 7ab4d5eb55e1d3900390b76e5f46e80e22d4e80e Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Sat, 10 Oct 2020 21:34:21 +0200 4Subject: [PATCH] configure.ac: allow the user to override RUST_TARGET 5 6When cross-compiling, RUST_TARGET is not always equal to host_triplet 7(e.g. buildroot) so allow the user to override this default value 8through RUST_TARGET environment variable 9 10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 11--- 12 configure.ac | 7 ++++++- 13 1 file changed, 6 insertions(+), 1 deletion(-) 14 15diff --git a/configure.ac b/configure.ac 16index 32c230209..7d7c9373f 100644 17--- a/configure.ac 18+++ b/configure.ac 19@@ -2489,7 +2489,12 @@ fi 20 have_rust_vendor="no" 21 22 if test "x$cross_compiling" = "xyes"; then 23- RUST_SURICATA_LIB_XC_DIR="${host_alias}/" 24+ if test "x$RUST_TARGET" != "x"; then 25+ RUST_SURICATA_LIB_XC_DIR="$RUST_TARGET/" 26+ AC_SUBST([RUST_TARGET],["--target $RUST_TARGET"]) 27+ else 28+ RUST_SURICATA_LIB_XC_DIR="${host_alias}/" 29+ fi 30 else 31 if test "x$CARGO_BUILD_TARGET" = "x"; then 32 RUST_SURICATA_LIB_XC_DIR= 33-- 342.28.0 35 36