diff options
Diffstat (limited to 'meta/recipes-devtools/rust/rust-llvm')
3 files changed, 89 insertions, 0 deletions
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 new file mode 100644 index 0000000000..48af6fc283 --- /dev/null +++ b/meta/recipes-devtools/rust/rust-llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch @@ -0,0 +1,31 @@ +From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Fri, 27 Nov 2020 10:11:08 +0000 +Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well + +Otherwise, there are instances which are identical in +every other field and therefore sort non-reproducibly +(which breaks binary and source reproducibiliy). + +Upstream-Status: Submitted [https://reviews.llvm.org/D97477] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp +index ccf0959389b..1f801e83b7d 100644 +--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp ++++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp +@@ -359,7 +359,10 @@ public: + // name of a class shouldn't be significant. However, some of the backends + // accidentally rely on this behaviour, so it will have to stay like this + // until they are fixed. +- return ValueName < RHS.ValueName; ++ if (ValueName != RHS.ValueName) ++ return ValueName < RHS.ValueName; ++ // All else being equal, we should sort by name, for source and binary reproducibility ++ return Name < RHS.Name; + } + }; + 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 new file mode 100644 index 0000000000..9be26677a9 --- /dev/null +++ b/meta/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch @@ -0,0 +1,33 @@ +From 7111770e8290082530d920e120995bf81431b0aa Mon Sep 17 00:00:00 2001 +From: Martin Kelly <mkelly@xevo.com> +Date: Fri, 19 May 2017 00:22:57 -0700 +Subject: [PATCH 12/18] llvm: allow env override of exe path + +When using a native llvm-config from inside a sysroot, we need llvm-config to +return the libraries, include directories, etc. from inside the sysroot rather +than from the native sysroot. Thus provide an env override for calling +llvm-config from a target sysroot. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Martin Kelly <mkelly@xevo.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/llvm/tools/llvm-config/llvm-config.cpp ++++ b/llvm/tools/llvm-config/llvm-config.cpp +@@ -226,6 +226,13 @@ Typical components:\n\ + + /// Compute the path to the main executable. + std::string GetExecutablePath(const char *Argv0) { ++ // Hack for Yocto: we need to override the root path when we are using ++ // llvm-config from within a target sysroot. ++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); ++ if (Sysroot != nullptr) { ++ return Sysroot; ++ } ++ + // This just needs to be some symbol in the binary; C++ doesn't + // allow taking the address of ::main however. + void *P = (void *)(intptr_t)GetExecutablePath; diff --git a/meta/recipes-devtools/rust/rust-llvm/0003-llvm-fix-include-benchmarks.patch b/meta/recipes-devtools/rust/rust-llvm/0003-llvm-fix-include-benchmarks.patch new file mode 100644 index 0000000000..ff31c0bc32 --- /dev/null +++ b/meta/recipes-devtools/rust/rust-llvm/0003-llvm-fix-include-benchmarks.patch @@ -0,0 +1,25 @@ +Subject: LLVM_INCLUDE_BENCHMARKS with llvm 14.0.1 failing to build + +https://github.com/llvm/llvm-project/issues/54941 + +The LLVM_INCLUDE_BENCHMARKS is turned OFF to fix the build error as +per the discussions in the above link. We will work on the issue and +replace the workaround with actual fix once committed in LLVM. + +Please refer the following link for more discussions on the issue:- +https://github.com/rust-lang/rust/issues/96054 + +Upstream-Status: Pending +Signed-off-by: Pgowda <pgowda.cve@gmail.com> + +--- a/llvm/CMakeLists.txt 2022-04-22 00:45:30.543445478 -0700 ++++ b/llvm/CMakeLists.txt 2022-04-22 00:45:42.095232974 -0700 +@@ -615,7 +615,7 @@ option(LLVM_INCLUDE_GO_TESTS "Include th + + option(LLVM_BUILD_BENCHMARKS "Add LLVM benchmark targets to the list of default + targets. If OFF, benchmarks still could be built using Benchmarks target." OFF) +-option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." ON) ++option(LLVM_INCLUDE_BENCHMARKS "Generate benchmark targets. If OFF, benchmarks can't be built." OFF) + + option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF) + option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON) |