All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander Kanavin" <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex.kanavin@gmail.com>
Subject: [PATCH 09/11] llvm: sort the lists in generated source reproducibibly
Date: Thu,  3 Dec 2020 14:37:25 +0100	[thread overview]
Message-ID: <20201203133727.12936-9-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20201203133727.12936-1-alex.kanavin@gmail.com>

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...r-sort-ClassInfo-lists-by-name-as-we.patch | 31 +++++++++++++++++++
 meta/recipes-devtools/llvm/llvm_git.bb        |  3 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch

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 @@
+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: Pending
+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/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index b146d0e6e3..43395f8cfc 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -33,7 +33,8 @@ SRCREV = "ef32c611aa214dea855364efd7ba451ec5ec3f74"
 SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH} \
            file://0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch;striplevel=2 \
            file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \
-          "
+           file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \
+           "
 
 UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P<pver>\d+(\.\d+)+)"
 
-- 
2.29.2


  parent reply	other threads:[~2020-12-03 13:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 13:37 [PATCH 01/11] meta/lib/oe/reproducible.py: gitsm:// works just as fine as git:// for timestamps Alexander Kanavin
2020-12-03 13:37 ` [PATCH 02/11] kea: fix reproducibility Alexander Kanavin
2020-12-03 19:07   ` [OE-core] " Khem Raj
2020-12-03 19:12     ` Alexander Kanavin
2020-12-03 19:18       ` Khem Raj
2020-12-03 19:22         ` Alexander Kanavin
2020-12-03 20:33           ` Khem Raj
2020-12-03 13:37 ` [PATCH 03/11] llvm: " Alexander Kanavin
2020-12-03 13:37 ` [PATCH 04/11] ruby: " Alexander Kanavin
2020-12-03 19:15   ` [OE-core] " Khem Raj
2020-12-03 19:20     ` Alexander Kanavin
2020-12-03 19:52       ` Khem Raj
2020-12-03 13:37 ` [PATCH 05/11] webkitgtk: " Alexander Kanavin
2020-12-03 13:37 ` [PATCH 06/11] ffmpeg: " Alexander Kanavin
2020-12-03 13:37 ` [PATCH 07/11] piglit: " Alexander Kanavin
2020-12-03 13:37 ` [PATCH 08/11] serf: do not install the static library Alexander Kanavin
2020-12-03 19:29   ` [OE-core] " Khem Raj
2020-12-03 19:51     ` Alexander Kanavin
2020-12-03 13:37 ` Alexander Kanavin [this message]
2020-12-03 19:45   ` [OE-core] [PATCH 09/11] llvm: sort the lists in generated source reproducibibly Khem Raj
2020-12-03 13:37 ` [PATCH 10/11] selftest/reproducible: enable world reproducibility test Alexander Kanavin
2020-12-03 13:37 ` [PATCH 11/11] selftest/reproducible: add an exclusion list for items that are not yet reproducible Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203133727.12936-9-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.