summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/conf/distro/include/maintainers.inc1
-rw-r--r--meta/conf/distro/include/rust_security_flags.inc1
-rw-r--r--meta/conf/distro/include/tcmode-default.inc2
-rw-r--r--meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch31
-rw-r--r--meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch33
-rw-r--r--meta/recipes-devtools/rust/rust-llvm_1.90.0.bb98
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>"
774RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>" 774RECIPE_MAINTAINER:pn-run-postinsts = "Ross Burton <ross.burton@arm.com>"
775RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>" 775RECIPE_MAINTAINER:pn-rust = "Randy MacLeod <Randy.MacLeod@windriver.com>"
776RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>" 776RECIPE_MAINTAINER:pn-rust-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Randy MacLeod <Randy.MacLeod@windriver.com>"
777RECIPE_MAINTAINER:pn-rust-llvm = "Randy MacLeod <Randy.MacLeod@windriver.com>"
778RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <unassigned@yoctoproject.org>" 777RECIPE_MAINTAINER:pn-rxvt-unicode = "Unassigned <unassigned@yoctoproject.org>"
779RECIPE_MAINTAINER:pn-sassc = "Simone Weiß <simone.p.weiss@posteo.com>" 778RECIPE_MAINTAINER:pn-sassc = "Simone Weiß <simone.p.weiss@posteo.com>"
780RECIPE_MAINTAINER:pn-sato-screenshot = "Ross Burton <ross.burton@arm.com>" 779RECIPE_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 @@
2SECURITY_CFLAGS:pn-rust-native = "${SECURITY_NO_PIE_CFLAGS}" 2SECURITY_CFLAGS:pn-rust-native = "${SECURITY_NO_PIE_CFLAGS}"
3SECURITY_CFLAGS:pn-rust-cross-${TARGET_ARCH} = "${SECURITY_NO_PIE_CFLAGS}" 3SECURITY_CFLAGS:pn-rust-cross-${TARGET_ARCH} = "${SECURITY_NO_PIE_CFLAGS}"
4SECURITY_CFLAGS:pn-rust = "${SECURITY_NO_PIE_CFLAGS}" 4SECURITY_CFLAGS:pn-rust = "${SECURITY_NO_PIE_CFLAGS}"
5SECURITY_CFLAGS:pn-rust-llvm = "${SECURITY_NO_PIE_CFLAGS}"
6 5
7SECURITY_LDFLAGS:pn-rust-cross-arm = " -lssp_nonshared -lssp" 6SECURITY_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}"
43PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}" 43PREFERRED_VERSION_libstd-rs ?= "${RUSTVERSION}"
44PREFERRED_VERSION_rust ?= "${RUSTVERSION}" 44PREFERRED_VERSION_rust ?= "${RUSTVERSION}"
45PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}" 45PREFERRED_VERSION_rust-cross-${TARGET_ARCH} ?= "${RUSTVERSION}"
46PREFERRED_VERSION_rust-llvm ?= "${RUSTVERSION}"
47PREFERRED_VERSION_rust-llvm-native ?= "${RUSTVERSION}"
48PREFERRED_VERSION_rust-native ?= "${RUSTVERSION}" 46PREFERRED_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 @@
1From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 27 Nov 2020 10:11:08 +0000
4Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well
5
6Otherwise, there are instances which are identical in
7every other field and therefore sort non-reproducibly
8(which breaks binary and source reproducibiliy).
9
10Upstream-Status: Submitted [https://reviews.llvm.org/D97477]
11Signed-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
16diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
17index 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 @@
1From 7111770e8290082530d920e120995bf81431b0aa Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH 12/18] llvm: allow env override of exe path
5
6When using a native llvm-config from inside a sysroot, we need llvm-config to
7return the libraries, include directories, etc. from inside the sysroot rather
8than from the native sysroot. Thus provide an env override for calling
9llvm-config from a target sysroot.
10
11Upstream-Status: Inappropriate [oe-core specific]
12Signed-off-by: Martin Kelly <mkelly@xevo.com>
13Signed-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 @@
1SUMMARY = "LLVM compiler framework (packaged with rust)"
2LICENSE ?= "Apache-2.0-with-LLVM-exception"
3HOMEPAGE = "http://www.rust-lang.org"
4
5# check src/llvm-project/llvm/CMakeLists.txt for llvm version in use
6#
7LLVM_RELEASE = "20.1.8"
8
9require rust-source.inc
10
11SRC_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
15S = "${RUSTSRC}/src/llvm-project/llvm"
16
17LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
18
19inherit cmake
20
21DEPENDS += "ninja-native rust-llvm-native"
22
23ARM_INSTRUCTION_SET:armv5 = "arm"
24ARM_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.
28CFLAGS:remove = "-g"
29CXXFLAGS:remove = "-g"
30
31LLVM_DIR = "llvm${LLVM_RELEASE}"
32
33RUST_LLVM_TARGETS ?= "ARM;AArch64;Mips;PowerPC;RISCV;X86"
34
35EXTRA_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
59EXTRA_OECMAKE += "\
60 -DPY_PYGMENTS_FOUND=OFF \
61 -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF \
62 -DPY_YAML_FOUND=OFF \
63"
64
65EXTRA_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
71EXTRA_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
79INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
80
81export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
82
83do_install:append () {
84 # we don't need any of this stuff to build Rust
85 rm -rf "${D}/usr/lib/cmake"
86}
87
88PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"
89
90# Add the extra locations to avoid the complaints about unpackaged files
91FILES:${PN}-bugpointpasses = "${libdir}/llvm-rust/lib/BugpointPasses.so"
92FILES:${PN}-llvmhello = "${libdir}/llvm-rust/lib/LLVMHello.so"
93FILES:${PN}-liblto = "${libdir}/llvm-rust/lib/libLTO.so.*"
94FILES:${PN}-staticdev =+ "${libdir}/llvm-rust/*/*.a"
95FILES:${PN} += "${libdir}/libLLVM*.so.* ${libdir}/llvm-rust/lib/*.so.* ${libdir}/llvm-rust/bin"
96FILES:${PN}-dev += "${datadir}/llvm ${libdir}/llvm-rust/lib/*.so ${libdir}/llvm-rust/include ${libdir}/llvm-rust/share ${libdir}/llvm-rust/lib/cmake"
97
98BBCLASSEXTEND = "native nativesdk"