public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 21/25] llvm: sort the lists in generated source reproducibibly
Date: Mon, 14 Dec 2020 04:36:50 -1000	[thread overview]
Message-ID: <da485fc44fb10aede3298dc149d16cbce91d55ae.1607956164.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1607956164.git.steve@sakoman.com>

From: Alexander Kanavin <alex.kanavin@gmail.com>

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>
---
 ...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 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"
 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.17.1


  parent reply	other threads:[~2020-12-14 14:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 14:36 [OE-core][dunfell 00/25] Patch review Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 01/25] libsdl2: Add directfb to PACKAGECONFIG rdepends Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 02/25] wireless-regdb: upgrade 2020.04.29 -> 2020.11.20 Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 03/25] kernel-dummy: fix executing unexpected tasks Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 04/25] lz4: Use the new branch naming from upstream Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 05/25] oeqa/devtool: use Yocto mirror for pv-1.5.3 tarball Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 06/25] devtool: remove unused variable Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 07/25] image_types: sort tarball file listings Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 08/25] linux-firmware: upgrade 20201022 -> 20201118 Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 09/25] linux-firmware: package ath11k firmware Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 10/25] meta/lib/oeqa/manual/oe-core.json: Update test_bitbake_devshell Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 11/25] cve-update-db-native: handle all-wildcard versions Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 12/25] coreutils: add SUSE-specific issues to CVE whitelist Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 13/25] libffi: add patch to revert clang VFP workaround Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 14/25] kernel-module-split.bbclass: fix kernel modules getting marked as CONFFILES Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 15/25] meta/lib/oe/reproducible.py: gitsm:// works just as fine as git:// for timestamps Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 16/25] llvm: fix reproducibility Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 17/25] ruby: " Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 18/25] webkitgtk: " Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 19/25] ffmpeg: " Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 20/25] serf: do not install the static library Steve Sakoman
2020-12-14 14:36 ` Steve Sakoman [this message]
2020-12-14 14:36 ` [OE-core][dunfell 22/25] glib-networking/btrfs-tools/dosfstools/parted/bmap-tools/libsoup-2.4: add nativesdk support Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 23/25] buildtools-tarball: add wic dependency into extended buildtools Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 24/25] metadata_scm: Fix signature handling of METADATA_REVISION and METADATA_BRANCH Steve Sakoman
2020-12-14 14:36 ` [OE-core][dunfell 25/25] python3: fix CVE-2019-20907 Steve Sakoman

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=da485fc44fb10aede3298dc149d16cbce91d55ae.1607956164.git.steve@sakoman.com \
    --to=steve@sakoman.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox