File tree Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Expand file tree Collapse file tree 3 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -549,7 +549,8 @@ inspecting signatures in Mach-O binaries.")
549
549
" glibc-versioned-locpath.patch"
550
550
" glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
551
551
" glibc-2.24-no-build-time-cxx-header-run.patch"
552
- " glibc-2.24-fcommon.patch" ))))))
552
+ " glibc-2.24-fcommon.patch"
553
+ " glibc-2.24-guix-prefix.patch" ))))))
553
554
554
555
(define-public glibc-2.27/bitcoin-patched
555
556
(package
@@ -566,7 +567,8 @@ inspecting signatures in Mach-O binaries.")
566
567
" 1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca" ))
567
568
(patches (search-our-patches " glibc-ldd-x86_64.patch"
568
569
" glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
569
- " glibc-2.27-dont-redefine-nss-database.patch" ))))))
570
+ " glibc-2.27-dont-redefine-nss-database.patch"
571
+ " glibc-2.27-guix-prefix.patch" ))))))
570
572
571
573
(packages->manifest
572
574
(append
Original file line number Diff line number Diff line change
1
+ Without ffile-prefix-map, the debug symbols will contain paths for the
2
+ guix store which will include the hashes of each package. However, the
3
+ hash for the same package will differ when on different architectures.
4
+ In order to be reproducible regardless of the architecture used to build
5
+ the package, map all guix store prefixes to something fixed, e.g. /usr.
6
+
7
+ We might be able to drop this in favour of using --with-nonshared-cflags
8
+ when we being using newer versions of glibc.
9
+
10
+ --- a/Makeconfig
11
+ +++ b/Makeconfig
12
+ @@ -950,6 +950,10 @@ object-suffixes-for-libc += .oS
13
+ # shared objects. We don't want to use CFLAGS-os because users may, for
14
+ # example, make that processor-specific.
15
+ CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
16
+ +
17
+ + # Map Guix store paths to /usr
18
+ + CFLAGS-.oS += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -fdebug-prefix-map={}=/usr" \;`
19
+ +
20
+ CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
21
+ libtype.oS = lib%_nonshared.a
22
+ endif
23
+ - -
24
+ 2.35.1
25
+
Original file line number Diff line number Diff line change
1
+ Without ffile-prefix-map, the debug symbols will contain paths for the
2
+ guix store which will include the hashes of each package. However, the
3
+ hash for the same package will differ when on different architectures.
4
+ In order to be reproducible regardless of the architecture used to build
5
+ the package, map all guix store prefixes to something fixed, e.g. /usr.
6
+
7
+ We might be able to drop this in favour of using --with-nonshared-cflags
8
+ when we being using newer versions of glibc.
9
+
10
+ --- a/Makeconfig
11
+ +++ b/Makeconfig
12
+ @@ -992,6 +992,10 @@ object-suffixes :=
13
+ CPPFLAGS-.o = $(pic-default)
14
+ # libc.a must be compiled with -fPIE/-fpie for static PIE.
15
+ CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) $(pie-default)
16
+ +
17
+ + # Map Guix store paths to /usr
18
+ + CFLAGS-.o += `find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -fdebug-prefix-map={}=/usr" \;`
19
+ +
20
+ libtype.o := lib%.a
21
+ object-suffixes += .o
22
+ ifeq (yes,$(build-shared))
23
+ - -
24
+ 2.35.1
25
+
You can’t perform that action at this time.
0 commit comments