summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rust/files/cargo-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rust/files/cargo-path.patch')
-rw-r--r--meta/recipes-devtools/rust/files/cargo-path.patch37
1 files changed, 0 insertions, 37 deletions
diff --git a/meta/recipes-devtools/rust/files/cargo-path.patch b/meta/recipes-devtools/rust/files/cargo-path.patch
deleted file mode 100644
index 9a50c40220..0000000000
--- a/meta/recipes-devtools/rust/files/cargo-path.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Fix the cargo binary path error and ensure that it is fetched
2during rustc bootstrap in rust oe-selftest.
3
4======================================================================
5ERROR: test_cargoflags (bootstrap_test.BuildBootstrap)
6----------------------------------------------------------------------
7Traceback (most recent call last):
8 File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap_test.py", line 157, in test_cargoflags
9 args, _ = self.build_args(env={"CARGOFLAGS": "--timings"})
10 File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap_test.py", line 154, in build_args
11 return build.build_bootstrap_cmd(env), env
12 File "/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/src/bootstrap/bootstrap.py", line 960, in build_bootstrap_cmd
13 raise Exception("no cargo executable found at `{}`".format(
14Exception: no cargo executable found at `/home/build-st/tmp/work/cortexa57-poky-linux/rust/1.74.1/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0/bin/cargo`
15
16Upstream-Status: Submitted [https://github.com/rust-lang/rust/pull/120125]
17
18Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
19---
20diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
21--- a/src/bootstrap/bootstrap.py
22+++ b/src/bootstrap/bootstrap.py
23@@ -954,9 +954,11 @@
24 if "RUSTFLAGS_BOOTSTRAP" in env:
25 env["RUSTFLAGS"] += " " + env["RUSTFLAGS_BOOTSTRAP"]
26
27- env["PATH"] = os.path.join(self.bin_root(), "bin") + \
28- os.pathsep + env["PATH"]
29- if not os.path.isfile(self.cargo()):
30+ cargo_bin_path = os.path.join(self.bin_root(), "bin", "cargo")
31+ if not os.path.isfile(cargo_bin_path):
32+ cargo_bin_path = os.getenv("RUST_TARGET_PATH") + "rust-snapshot/bin/cargo"
33+ env["PATH"] = os.path.dirname(cargo_bin_path) + os.pathsep + env["PATH"]
34+ else:
35 raise Exception("no cargo executable found at `{}`".format(
36 self.cargo()))
37 args = [self.cargo(), "build", "--manifest-path",