diff options
author | Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com> | 2025-10-10 07:47:33 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-10 17:42:09 +0100 |
commit | e6df2cef9ee7d08fbb666debef4b3cba3bd3306c (patch) | |
tree | b2a65d8f86b6c33af70658b05d01ca7fffa7cc14 | |
parent | 8b419cd61e9edb87012627809643120ee0c88d01 (diff) | |
download | poky-e6df2cef9ee7d08fbb666debef4b3cba3bd3306c.tar.gz |
rust: Drop rust-llvm
Dropping rust-llvm because now rust depends on llvm.
0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
0002-llvm-allow-env-override-of-exe-path.patch
(We have the above two patches in llvm)
(From OE-Core rev: abcf95df47497d77eadac8f8eeda5a0d00c55826)
Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6 files changed, 0 insertions, 166 deletions
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index d2c613b8e9..6e15c6f3d0 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc | |||
@@ -774,7 +774,6 @@ RECIPE_MAINTAINER:pn-ruby = "Ross Burton <ross.burton@arm.com>" | |||
774 | RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>" | 774 | RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>" |
775 | RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 775 | RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
776 | RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>" | 776 | RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>" |
777 | RECIPE_MAINTAINER:pn-rust-llvm = "Randy MacLeod <Randy.MacLeod@windriver.com>" | ||
778 | RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <unassigned@yoctoproject.org>" | 777 | RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <unassigned@yoctoproject.org>" |
779 | RECIPE_MAINTAINER:pn-sassc = "Simone Weiß <simone.p.weiss@posteo.com>" | 778 | RECIPE_MAINTAINER:pn-sassc = "Simone Weiß <simone.p.weiss@posteo.com>" |
780 | RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" | 779 | RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" |
diff --git a/meta/conf/distro/include/rust_security_flags.inc b/meta/conf/distro/include/rust_security_flags.inc index 590bef17a0..f77c851197 100644 --- a/meta/conf/distro/include/rust_security_flags.inc +++ b/meta/conf/distro/include/rust_security_flags.inc | |||
@@ -2,6 +2,5 @@ | |||
2 | SECURITY_CFLAGS:pn-rust-native = "${SECURITY_NO_PIE_CFLAGS}" | 2 | SECURITY_CFLAGS:pn-rust-native = "${SECURITY_NO_PIE_CFLAGS}" |
3 | SECURITY_CFLAGS:pn-rust-cross-${TARGET_ARCH} = "${SECURITY_NO_PIE_CFLAGS}" | 3 | SECURITY_CFLAGS:pn-rust-cross-${TARGET_ARCH} = "${SECURITY_NO_PIE_CFLAGS}" |
4 | SECURITY_CFLAGS:pn-rust = "${SECURITY_NO_PIE_CFLAGS}" | 4 | SECURITY_CFLAGS:pn-rust = "${SECURITY_NO_PIE_CFLAGS}" |
5 | SECURITY_CFLAGS:pn-rust-llvm = "${SECURITY_NO_PIE_CFLAGS}" | ||
6 | 5 | ||
7 | SECURITY_LDFLAGS:pn-rust-cross-arm = " -lssp_nonshared -lssp" | 6 | SECURITY_LDFLAGS:pn-rust-cross-arm = " -lssp_nonshared -lssp" |
diff --git a/meta/conf/distro/include/tcmode-default.inc b/meta/conf/distro/include/tcmode-default.inc index 133608a6e7..ff10f14a6b 100644 --- a/meta/conf/distro/include/tcmode-default.inc +++ b/meta/conf/distro/include/tcmode-default.inc | |||
@@ -43,7 +43,5 @@ PREFERRED_VERSION_cargo-native ?= "${RUSTVERSION}" | |||
43 | PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}" | 43 | PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}" |
44 | PREFERRED_VERSION_rust ?= "${RUSTVERSION}" | 44 | PREFERRED_VERSION_rust ?= "${RUSTVERSION}" |
45 | PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}" | 45 | PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}" |
46 | PREFERRED_VERSION_rust-llvm ?= "${RUSTVERSION}" | ||
47 | PREFERRED_VERSION_rust-llvm-native ?= "${RUSTVERSION}" | ||
48 | PREFERRED_VERSION_rust-native ?= "${RUSTVERSION}" | 46 | PREFERRED_VERSION_rust-native ?= "${RUSTVERSION}" |
49 | 47 | ||
diff --git a/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch deleted file mode 100644 index 48af6fc283..0000000000 --- a/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 27 Nov 2020 10:11:08 +0000 | ||
4 | Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well | ||
5 | |||
6 | Otherwise, there are instances which are identical in | ||
7 | every other field and therefore sort non-reproducibly | ||
8 | (which breaks binary and source reproducibiliy). | ||
9 | |||
10 | Upstream-Status: Submitted [https://reviews.llvm.org/D97477] | ||
11 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
12 | --- | ||
13 | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++- | ||
14 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
17 | index ccf0959389b..1f801e83b7d 100644 | ||
18 | --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
19 | +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp | ||
20 | @@ -359,7 +359,10 @@ public: | ||
21 | // name of a class shouldn't be significant. However, some of the backends | ||
22 | // accidentally rely on this behaviour, so it will have to stay like this | ||
23 | // until they are fixed. | ||
24 | - return ValueName < RHS.ValueName; | ||
25 | + if (ValueName != RHS.ValueName) | ||
26 | + return ValueName < RHS.ValueName; | ||
27 | + // All else being equal, we should sort by name, for source and binary reproducibility | ||
28 | + return Name < RHS.Name; | ||
29 | } | ||
30 | }; | ||
31 | |||
diff --git a/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch b/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch deleted file mode 100644 index 9be26677a9..0000000000 --- a/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 7111770e8290082530d920e120995bf81431b0aa Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Kelly <mkelly@xevo.com> | ||
3 | Date: Fri, 19 May 2017 00:22:57 -0700 | ||
4 | Subject: [PATCH 12/18] llvm: allow env override of exe path | ||
5 | |||
6 | When using a native llvm-config from inside a sysroot, we need llvm-config to | ||
7 | return the libraries, include directories, etc. from inside the sysroot rather | ||
8 | than from the native sysroot. Thus provide an env override for calling | ||
9 | llvm-config from a target sysroot. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe-core specific] | ||
12 | Signed-off-by: Martin Kelly <mkelly@xevo.com> | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ | ||
16 | 1 file changed, 7 insertions(+) | ||
17 | |||
18 | --- a/llvm/tools/llvm-config/llvm-config.cpp | ||
19 | +++ b/llvm/tools/llvm-config/llvm-config.cpp | ||
20 | @@ -226,6 +226,13 @@ Typical components:\n\ | ||
21 | |||
22 | /// Compute the path to the main executable. | ||
23 | std::string GetExecutablePath(const char *Argv0) { | ||
24 | + // Hack for Yocto: we need to override the root path when we are using | ||
25 | + // llvm-config from within a target sysroot. | ||
26 | + const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); | ||
27 | + if (Sysroot != nullptr) { | ||
28 | + return Sysroot; | ||
29 | + } | ||
30 | + | ||
31 | // This just needs to be some symbol in the binary; C++ doesn't | ||
32 | // allow taking the address of ::main however. | ||
33 | void *P = (void *)(intptr_t)GetExecutablePath; | ||
diff --git a/meta/recipes-devtools/rust/rust-llvm_1.90.0.bb b/meta/recipes-devtools/rust/rust-llvm_1.90.0.bb deleted file mode 100644 index 42d4031da1..0000000000 --- a/meta/recipes-devtools/rust/rust-llvm_1.90.0.bb +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | SUMMARY = "LLVM compiler framework (packaged with rust)" | ||
2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" | ||
3 | HOMEPAGE = "http://www.rust-lang.org" | ||
4 | |||
5 | # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use | ||
6 | # | ||
7 | LLVM_RELEASE = "20.1.8" | ||
8 | |||
9 | require rust-source.inc | ||
10 | |||
11 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ | ||
12 | file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ | ||
13 | " | ||
14 | |||
15 | S = "${RUSTSRC}/src/llvm-project/llvm" | ||
16 | |||
17 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | DEPENDS += "ninja-native rust-llvm-native" | ||
22 | |||
23 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
24 | ARM_INSTRUCTION_SET:armv4t = "arm" | ||
25 | |||
26 | # rustc_llvm with debug info is not recognized as a valid crate that's | ||
27 | # generated by rust-llvm-native. | ||
28 | CFLAGS:remove = "-g" | ||
29 | CXXFLAGS:remove = "-g" | ||
30 | |||
31 | LLVM_DIR = "llvm${LLVM_RELEASE}" | ||
32 | |||
33 | RUST_LLVM_TARGETS ?= "ARM;AArch64;Mips;PowerPC;RISCV;X86" | ||
34 | |||
35 | EXTRA_OECMAKE = " \ | ||
36 | -DCMAKE_BUILD_TYPE=Release \ | ||
37 | -DLLVM_TARGETS_TO_BUILD='${RUST_LLVM_TARGETS}' \ | ||
38 | -DLLVM_BUILD_DOCS=OFF \ | ||
39 | -DLLVM_ENABLE_TERMINFO=OFF \ | ||
40 | -DLLVM_ENABLE_ZLIB=OFF \ | ||
41 | -DLLVM_ENABLE_ZSTD=OFF \ | ||
42 | -DLLVM_ENABLE_LIBXML2=OFF \ | ||
43 | -DLLVM_ENABLE_FFI=OFF \ | ||
44 | -DLLVM_ENABLE_LIBEDIT=OFF \ | ||
45 | -DLLVM_INSTALL_UTILS=ON \ | ||
46 | -DLLVM_BUILD_EXAMPLES=OFF \ | ||
47 | -DLLVM_BUILD_LLVM_DYLIB=ON \ | ||
48 | -DLLVM_LINK_LLVM_DYLIB=ON \ | ||
49 | -DLLVM_INCLUDE_EXAMPLES=OFF \ | ||
50 | -DLLVM_BUILD_TESTS=OFF \ | ||
51 | -DLLVM_INCLUDE_TESTS=OFF \ | ||
52 | -DLLVM_INCLUDE_BENCHMARKS=OFF \ | ||
53 | -DLLVM_TARGET_ARCH=${TARGET_ARCH} \ | ||
54 | -DCMAKE_INSTALL_PREFIX:PATH=${libdir}/llvm-rust \ | ||
55 | " | ||
56 | |||
57 | # Forcibly disable the detection of these packages as otherwise | ||
58 | # it will look at the host Python install | ||
59 | EXTRA_OECMAKE += "\ | ||
60 | -DPY_PYGMENTS_FOUND=OFF \ | ||
61 | -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF \ | ||
62 | -DPY_YAML_FOUND=OFF \ | ||
63 | " | ||
64 | |||
65 | EXTRA_OECMAKE:append:class-target = "\ | ||
66 | -DLLVM_BUILD_TOOLS=OFF \ | ||
67 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
68 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
69 | " | ||
70 | |||
71 | EXTRA_OECMAKE:append:class-nativesdk = "\ | ||
72 | -DLLVM_BUILD_TOOLS=OFF \ | ||
73 | -DLLVM_TABLEGEN=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-tblgen \ | ||
74 | -DLLVM_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/llvm-rust/bin/llvm-config \ | ||
75 | " | ||
76 | |||
77 | # The debug symbols are huge here (>2GB) so suppress them since they | ||
78 | # provide almost no value. If you really need them then override this | ||
79 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
80 | |||
81 | export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config" | ||
82 | |||
83 | do_install:append () { | ||
84 | # we don't need any of this stuff to build Rust | ||
85 | rm -rf "${D}/usr/lib/cmake" | ||
86 | } | ||
87 | |||
88 | PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto" | ||
89 | |||
90 | # Add the extra locations to avoid the complaints about unpackaged files | ||
91 | FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so" | ||
92 | FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so" | ||
93 | FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*" | ||
94 | FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a" | ||
95 | FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin" | ||
96 | FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake" | ||
97 | |||
98 | BBCLASSEXTEND = "native nativesdk" | ||