guix: patch store paths out of libunwind
Apply libgcc patches to Linux as well as Windows cross.
This commit is contained in:
2 files changed
+16
-7
No files matched your search
@@ -99,10 +99,10 @@ chain for " target " development."))
|
|||||||
|
|
||||||
(define* (make-bitcoin-cross-toolchain target
|
(define* (make-bitcoin-cross-toolchain target
|
||||||
#:key
|
#:key
|
||||||
(base-gcc-for-libc linux-base-gcc)
|
(base-gcc-for-libc (gcc-libgcc-patches linux-base-gcc))
|
||||||
(base-kernel-headers base-linux-kernel-headers)
|
(base-kernel-headers base-linux-kernel-headers)
|
||||||
(base-libc glibc-2.31)
|
(base-libc glibc-2.31)
|
||||||
(base-gcc linux-base-gcc))
|
(base-gcc (gcc-libgcc-patches linux-base-gcc)))
|
||||||
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
|
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
|
||||||
desirable for building Bitcoin Core release binaries."
|
desirable for building Bitcoin Core release binaries."
|
||||||
(make-cross-toolchain target
|
(make-cross-toolchain target
|
||||||
@@ -111,7 +111,7 @@ desirable for building Bitcoin Core release binaries."
|
|||||||
base-libc
|
base-libc
|
||||||
base-gcc))
|
base-gcc))
|
||||||
|
|
||||||
(define (gcc-mingw-patches gcc)
|
(define (gcc-libgcc-patches gcc)
|
||||||
(package-with-extra-patches gcc
|
(package-with-extra-patches gcc
|
||||||
(search-our-patches "gcc-remap-guix-store.patch")))
|
(search-our-patches "gcc-remap-guix-store.patch")))
|
||||||
|
|
||||||
@@ -128,10 +128,10 @@ desirable for building Bitcoin Core release binaries."
|
|||||||
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
|
(let* ((xbinutils (binutils-mingw-patches (cross-binutils target)))
|
||||||
(machine (substring target 0 (string-index target #\-)))
|
(machine (substring target 0 (string-index target #\-)))
|
||||||
(pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine
|
(pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine
|
||||||
#:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc))
|
#:xgcc (cross-gcc target #:xgcc (gcc-libgcc-patches base-gcc))
|
||||||
#:with-winpthreads? #t)))
|
#:with-winpthreads? #t)))
|
||||||
(pthreads-xgcc (cross-gcc target
|
(pthreads-xgcc (cross-gcc target
|
||||||
#:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
|
#:xgcc (gcc-libgcc-patches mingw-w64-base-gcc)
|
||||||
#:xbinutils xbinutils
|
#:xbinutils xbinutils
|
||||||
#:libc pthreads-xlibc)))
|
#:libc pthreads-xlibc)))
|
||||||
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Without ffile-prefix-map, the debug symbols will contain paths for the
|
Without -ffile-prefix-map, the debug symbols will contain paths for the
|
||||||
guix store which will include the hashes of each package. However, the
|
guix store which will include the hashes of each package. However, the
|
||||||
hash for the same package will differ when on different architectures.
|
hash for the same package will differ when on different architectures.
|
||||||
In order to be reproducible regardless of the architecture used to build
|
In order to be reproducible regardless of the architecture used to build
|
||||||
@@ -6,7 +6,7 @@ the package, map all guix store prefixes to something fixed, e.g. /usr.
|
|||||||
|
|
||||||
--- a/libgcc/Makefile.in
|
--- a/libgcc/Makefile.in
|
||||||
+++ b/libgcc/Makefile.in
|
+++ b/libgcc/Makefile.in
|
||||||
@@ -854,7 +854,7 @@ endif
|
@@ -857,7 +857,7 @@ endif
|
||||||
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
||||||
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
||||||
|
|
||||||
@@ -15,6 +15,15 @@ the package, map all guix store prefixes to something fixed, e.g. /usr.
|
|||||||
|
|
||||||
ifeq ($(enable_shared),yes)
|
ifeq ($(enable_shared),yes)
|
||||||
|
|
||||||
|
@@ -880,7 +880,7 @@ endif
|
||||||
|
# Build LIBUNWIND. Use -fno-exceptions so that the unwind library does
|
||||||
|
# not generate calls to __gcc_personality_v0.
|
||||||
|
|
||||||
|
-c_flags := -fno-exceptions
|
||||||
|
+c_flags := -fno-exceptions $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
|
||||||
|
|
||||||
|
libunwind-objects += $(addsuffix $(objext),$(basename $(notdir $(LIBUNWIND))))
|
||||||
|
|
||||||
--
|
--
|
||||||
2.37.0
|
2.37.0
|
||||||
|
|
||||||
Reference in new issue
Block a user