diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-12-03 14:37:25 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-18 14:20:19 +0000 |
commit | 7af584222b68bc834688985984a5ebfdf0c432ba (patch) | |
tree | 11e68079134ff2d2961bdf8128fa57fd6d0e6211 /meta/recipes-devtools | |
parent | 757e125e38cb0c2f523c6e629c60a7489a6ea333 (diff) | |
download | poky-7af584222b68bc834688985984a5ebfdf0c432ba.tar.gz |
llvm: sort the lists in generated source reproducibibly
(From OE-Core rev: da485fc44fb10aede3298dc149d16cbce91d55ae)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e2e230bd7ad73a57bfb6808a3c537f74f35e2378)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch | 31 | ||||
-rw-r--r-- | meta/recipes-devtools/llvm/llvm_git.bb | 3 |
2 files changed, 33 insertions, 1 deletions
diff --git a/meta/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/meta/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch new file mode 100644 index 0000000000..20eea060b1 --- /dev/null +++ b/meta/recipes-devtools/llvm/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: Pending | ||
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/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb index 6ea1b80e1f..534e2c685f 100644 --- a/meta/recipes-devtools/llvm/llvm_git.bb +++ b/meta/recipes-devtools/llvm/llvm_git.bb | |||
@@ -33,7 +33,8 @@ SRCREV = "c1a0a213378a458fbea1a5c77b315c7dce08fd05" | |||
33 | SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \ | 33 | SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \ |
34 | file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \ | 34 | file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \ |
35 | file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ | 35 | file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ |
36 | " | 36 | file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ |
37 | " | ||
37 | 38 | ||
38 | UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)" | 39 | UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)" |
39 | 40 | ||