diff options
author | fanquake <fanquake@gmail.com> | 2022-08-17 12:18:57 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-11-08 17:05:39 +0000 |
commit | 0f4583e5c114e13c3c937f1832ab0c39751cf38c (patch) | |
tree | 8fe419db61b92b3901534f24f5c1b89b5652dfb3 | |
parent | 32fafa4f81bee8a9a45150f41a793bce6591dc6b (diff) |
guix: use --build={arch}-guix-linux-gnu in cross toolchain
Technically we are always cross-compiling, so make that explicit.
Fixes: #22458.
Github-Pull: #25861
Rebased-From: 56e79fe683d36c1944e52326fae3bcc4cb7deec7
-rw-r--r-- | contrib/guix/manifest.scm | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index b1de5330b9..0dcff1e43e 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -78,6 +78,11 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" (("-rpath=") "-rpath-link=")) #t)))))))) +(define building-on (string-append (list-ref (string-split (%current-system) #\-) 0) "-guix-linux-gnu")) + +(define (explicit-cross-configure package) + (package-with-extra-configure-variable package "--build" building-on)) + (define (make-cross-toolchain target base-gcc-for-libc base-kernel-headers @@ -87,9 +92,9 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" (let* ((xbinutils (cross-binutils target)) ;; 1. Build a cross-compiling gcc without targeting any libc, derived ;; from BASE-GCC-FOR-LIBC - (xgcc-sans-libc (cross-gcc target - #:xgcc base-gcc-for-libc - #:xbinutils xbinutils)) + (xgcc-sans-libc (explicit-cross-configure (cross-gcc target + #:xgcc base-gcc-for-libc + #:xbinutils xbinutils))) ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived ;; from BASE-KERNEL-HEADERS (xkernel (cross-kernel-headers target @@ -98,17 +103,17 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html" xbinutils)) ;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL, ;; derived from BASE-LIBC - (xlibc (cross-libc target - base-libc - xgcc-sans-libc - xbinutils - xkernel)) + (xlibc (explicit-cross-configure (cross-libc target + base-libc + xgcc-sans-libc + xbinutils + xkernel))) ;; 4. Build a cross-compiling gcc targeting XLIBC, derived from ;; BASE-GCC - (xgcc (cross-gcc target - #:xgcc base-gcc - #:xbinutils xbinutils - #:libc xlibc))) + (xgcc (explicit-cross-configure (cross-gcc target + #:xgcc base-gcc + #:xbinutils xbinutils + #:libc xlibc)))) ;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and ;; XGCC (package |