mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add dwarves.
* gnu/packages/linux.scm (dwarves): New variable. Change-Id: Ib2452868eae76bea95060a70e568dfb6e84b2a75
This commit is contained in:
parent
3528d888ee
commit
e9e825387f
3 changed files with 72 additions and 0 deletions
23
gnu/packages/patches/dwarves-threading-reproducibility.patch
Normal file
23
gnu/packages/patches/dwarves-threading-reproducibility.patch
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue