summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-08 10:02:36 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-05-29 22:01:23 -0400
commite9e825387f1daefde91b0ba5c5ec3540b0b227fa (patch)
tree1f33464ce0c07fab07631edb5d455d44357be5a4 /gnu/packages/patches
parent3528d888eed2e226826085f68b40171dee18c5cb (diff)
downloadguix-patches-e9e825387f1daefde91b0ba5c5ec3540b0b227fa.tar
guix-patches-e9e825387f1daefde91b0ba5c5ec3540b0b227fa.tar.gz
gnu: Add dwarves.
* gnu/packages/linux.scm (dwarves): New variable. Change-Id: Ib2452868eae76bea95060a70e568dfb6e84b2a75
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/dwarves-threading-reproducibility.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/gnu/packages/patches/dwarves-threading-reproducibility.patch b/gnu/packages/patches/dwarves-threading-reproducibility.patch
new file mode 100644
index 0000000000..8771ca6b0d
--- /dev/null
+++ b/gnu/packages/patches/dwarves-threading-reproducibility.patch
@@ -0,0 +1,23 @@
+Retrieved from nixpkgs.
+
+This causes pahole to use '-j1' (single thread) when SOURCE_DATE_EPOCH
+is set, to ensure it produces reproducible output.
+
+diff --git a/pahole.c b/pahole.c
+index 6fc4ed6..a4e306f 100644
+--- a/pahole.c
++++ b/pahole.c
+@@ -1687,8 +1687,11 @@ static error_t pahole__options_parser(int key, char *arg,
+ class_name = arg; break;
+ case 'j':
+ #if _ELFUTILS_PREREQ(0, 178)
+- conf_load.nr_jobs = arg ? atoi(arg) :
+- sysconf(_SC_NPROCESSORS_ONLN) * 1.1;
++ // Force single thread if reproducibility is desirable.
++ if (!getenv("SOURCE_DATE_EPOCH")) {
++ conf_load.nr_jobs = arg ? atoi(arg) :
++ sysconf(_SC_NPROCESSORS_ONLN) * 1.1;
++ }
+ #else
+ fputs("pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...\n", stderr);
+ #endif