diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index f7e3f39503..5923725f5e 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -20,8 +20,10 @@ # ################################################################################ +BR_CARGO_HOME = $(HOST_DIR)/share/cargo + PKG_COMMON_CARGO_ENV = \ - CARGO_HOME=$(HOST_DIR)/share/cargo + CARGO_HOME=$(BR_CARGO_HOME) # __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS is needed to allow # passing the -Z target-applies-to-host, which is needed together with @@ -79,7 +81,7 @@ $(2)_DOWNLOAD_DEPENDENCIES += host-rustc $(2)_DEPENDENCIES += host-rustc $(2)_DOWNLOAD_POST_PROCESS = cargo -$(2)_DL_ENV += CARGO_HOME=$$(HOST_DIR)/share/cargo +$(2)_DL_ENV += CARGO_HOME=$$(BR_CARGO_HOME) # If building in a sub directory, use that to find the Cargo.toml ifneq ($$($(2)_SUBDIR),) diff --git a/package/suricata/suricata.mk b/package/suricata/suricata.mk index 8c38b7c713..72b72cc94d 100644 --- a/package/suricata/suricata.mk +++ b/package/suricata/suricata.mk @@ -29,7 +29,7 @@ SURICATA_DEPENDENCIES = \ SURICATA_CONF_ENV = \ ac_cv_path_HAVE_SPHINXBUILD=no \ - CARGO_HOME=$(HOST_DIR)/share/cargo \ + CARGO_HOME=$(BR_CARGO_HOME) \ RUST_TARGET=$(RUSTC_TARGET_NAME) SURICATA_CONF_OPTS = \