|
@@ -67,9 +67,26 @@ define HOST_RUST_BUILD_CMDS
|
|
|
cd $(@D); $(HOST_MAKE_ENV) $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) x.py build
|
|
|
endef
|
|
|
|
|
|
+HOST_RUST_INSTALL_OPTS = \
|
|
|
+ --prefix=$(HOST_DIR) \
|
|
|
+ --disable-ldconfig
|
|
|
+
|
|
|
+define HOST_RUST_INSTALL_RUSTC
|
|
|
+ cd $(@D)/build/tmp/tarball/rust/$(RUSTC_HOST_NAME)/rust-$(RUST_VERSION)-$(RUSTC_HOST_NAME); \
|
|
|
+ ./install.sh $(HOST_RUST_INSTALL_OPTS) --components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME)
|
|
|
+endef
|
|
|
+
|
|
|
+ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
|
|
|
+define HOST_RUST_INSTALL_LIBSTD_TARGET
|
|
|
+ cd $(@D)/build/tmp/tarball/rust-std/$(RUSTC_TARGET_NAME)/rust-std-$(RUST_VERSION)-$(RUSTC_TARGET_NAME); \
|
|
|
+ ./install.sh $(HOST_RUST_INSTALL_OPTS)
|
|
|
+endef
|
|
|
+endif
|
|
|
+
|
|
|
define HOST_RUST_INSTALL_CMDS
|
|
|
cd $(@D); $(HOST_MAKE_ENV) $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) x.py dist
|
|
|
- cd $(@D); $(HOST_MAKE_ENV) $(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR) x.py install
|
|
|
+ $(HOST_RUST_INSTALL_RUSTC)
|
|
|
+ $(HOST_RUST_INSTALL_LIBSTD_TARGET)
|
|
|
endef
|
|
|
|
|
|
$(eval $(host-generic-package))
|