From 013b2100337c86e5d68e3cbb5445598fd0c14d19 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 2 Mar 2021 11:07:11 -0800 Subject: [PATCH] rust-llvm: Fix build with gcc11 Backport a patch from upstream llvm Signed-off-by: Khem Raj --- recipes-devtools/rust/rust-llvm.inc | 4 ++- .../0001-nfc-Fix-missing-include.patch | 26 +++++++++++++++++++ ...-llvm-allow-env-override-of-exe-path.patch | 6 ++--- 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 recipes-devtools/rust/rust-llvm/0001-nfc-Fix-missing-include.patch diff --git a/recipes-devtools/rust/rust-llvm.inc b/recipes-devtools/rust/rust-llvm.inc index 53ae87e..80f4f54 100644 --- a/recipes-devtools/rust/rust-llvm.inc +++ b/recipes-devtools/rust/rust-llvm.inc @@ -1,7 +1,9 @@ SUMMARY = "LLVM compiler framework (packaged with rust)" LICENSE ?= "Apache-2.0-with-LLVM-exception" -SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch" +SRC_URI += "file://0001-nfc-Fix-missing-include.patch;striplevel=2 \ + file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ + " S = "${RUSTSRC}/src/llvm-project/llvm" diff --git a/recipes-devtools/rust/rust-llvm/0001-nfc-Fix-missing-include.patch b/recipes-devtools/rust/rust-llvm/0001-nfc-Fix-missing-include.patch new file mode 100644 index 0000000..f6dee77 --- /dev/null +++ b/recipes-devtools/rust/rust-llvm/0001-nfc-Fix-missing-include.patch @@ -0,0 +1,26 @@ +From 3b7e611bd58ba842470d17374c550e14bceca5c7 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Tue, 10 Nov 2020 14:55:25 +0100 +Subject: [PATCH] [nfc] Fix missing include + +Upstream-Status: Backport [https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1] +Signed-off-by: Khem Raj +--- + llvm/utils/benchmark/src/benchmark_register.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/llvm/utils/benchmark/src/benchmark_register.h b/llvm/utils/benchmark/src/benchmark_register.h +index 0705e219f2fa..4caa5ad4da07 100644 +--- a/llvm/utils/benchmark/src/benchmark_register.h ++++ b/llvm/utils/benchmark/src/benchmark_register.h +@@ -1,6 +1,7 @@ + #ifndef BENCHMARK_REGISTER_H + #define BENCHMARK_REGISTER_H + ++#include + #include + + #include "check.h" +-- +2.30.1 + diff --git a/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch b/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch index 65dbd6f..943c211 100644 --- a/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch +++ b/recipes-devtools/rust/rust-llvm/0002-llvm-allow-env-override-of-exe-path.patch @@ -11,11 +11,11 @@ llvm-config from a target sysroot. Signed-off-by: Martin Kelly Signed-off-by: Khem Raj --- - tools/llvm-config/llvm-config.cpp | 7 +++++++ + llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) ---- a/tools/llvm-config/llvm-config.cpp -+++ b/tools/llvm-config/llvm-config.cpp +--- 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.