diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-01-09 23:27:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-11 10:53:44 +0000 |
commit | 43b776610593bad949ec1871298700317e3224fc (patch) | |
tree | 188906b93cab1cbedd23beee10431cd7f59cce6b /meta | |
parent | 5002a548ad8a01735054ae540e295abfdf7f1397 (diff) | |
download | poky-43b776610593bad949ec1871298700317e3224fc.tar.gz |
rust-llvm: apply the same reproducibility patch as for llvm proper
(From OE-Core rev: a845029df7ea8c1bd987ffac3902d4521742debb)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 33 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index a0dc76977f..e539365031 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -17,11 +17,7 @@ import stat | |||
17 | import os | 17 | import os |
18 | import datetime | 18 | import datetime |
19 | 19 | ||
20 | # rust-llvm: | ||
21 | #https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20210825-kaihham6/ | ||
22 | exclude_packages = [ | 20 | exclude_packages = [ |
23 | 'rust-llvm-liblto', | ||
24 | 'rust-llvm-staticdev' | ||
25 | ] | 21 | ] |
26 | 22 | ||
27 | def is_excluded(package): | 23 | def is_excluded(package): |
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc index 0f8fb785b7..5c2ccdac9a 100644 --- a/meta/recipes-devtools/rust/rust-llvm.inc +++ b/meta/recipes-devtools/rust/rust-llvm.inc | |||
@@ -2,7 +2,8 @@ SUMMARY = "LLVM compiler framework (packaged with rust)" | |||
2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" | 2 | LICENSE ?= "Apache-2.0-with-LLVM-exception" |
3 | HOMEPAGE = "http://www.rust-lang.org" | 3 | HOMEPAGE = "http://www.rust-lang.org" |
4 | 4 | ||
5 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2" | 5 | SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ |
6 | file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2" | ||
6 | 7 | ||
7 | S = "${RUSTSRC}/src/llvm-project/llvm" | 8 | S = "${RUSTSRC}/src/llvm-project/llvm" |
8 | 9 | ||
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 @@ | |||
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 | |||