@@ -78,6 +78,11 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
78
78
((" -rpath=" ) " -rpath-link=" ))
79
79
#t ))))))))
80
80
81
+ (define building-on (string-append (list-ref (string-split (%current-system) #\- ) 0 ) " -guix-linux-gnu" ))
82
+
83
+ (define (explicit-cross-configure package )
84
+ (package-with-extra-configure-variable package " --build" building-on))
85
+
81
86
(define (make-cross-toolchain target
82
87
base-gcc-for-libc
83
88
base-kernel-headers
@@ -87,9 +92,9 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
87
92
(let* ((xbinutils (cross-binutils target))
88
93
; ; 1. Build a cross-compiling gcc without targeting any libc, derived
89
94
; ; from BASE-GCC-FOR-LIBC
90
- (xgcc-sans-libc (cross-gcc target
91
- #:xgcc base-gcc-for-libc
92
- #:xbinutils xbinutils))
95
+ (xgcc-sans-libc (explicit-cross-configure ( cross-gcc target
96
+ #:xgcc base-gcc-for-libc
97
+ #:xbinutils xbinutils) ))
93
98
; ; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
94
99
; ; from BASE-KERNEL-HEADERS
95
100
(xkernel (cross-kernel-headers target
@@ -98,17 +103,17 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
98
103
xbinutils))
99
104
; ; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL,
100
105
; ; derived from BASE-LIBC
101
- (xlibc (cross-libc target
102
- base-libc
103
- xgcc-sans-libc
104
- xbinutils
105
- xkernel))
106
+ (xlibc (explicit-cross-configure ( cross-libc target
107
+ base-libc
108
+ xgcc-sans-libc
109
+ xbinutils
110
+ xkernel) ))
106
111
; ; 4. Build a cross-compiling gcc targeting XLIBC, derived from
107
112
; ; BASE-GCC
108
- (xgcc (cross-gcc target
109
- #:xgcc base-gcc
110
- #:xbinutils xbinutils
111
- #:libc xlibc)))
113
+ (xgcc (explicit-cross-configure ( cross-gcc target
114
+ #:xgcc base-gcc
115
+ #:xbinutils xbinutils
116
+ #:libc xlibc) )))
112
117
; ; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
113
118
; ; XGCC
114
119
(package
0 commit comments