@@ -40,20 +40,6 @@ FILE-NAME found in ./patches relative to the current file."
40
40
((%patch-path (list (string-append (dirname (current-filename)) " /patches" ))))
41
41
(list (search-patch file-name) ...)))
42
42
43
- (define (make-ssp-fixed-gcc xgcc )
44
- "Given a XGCC package, return a modified package that uses the SSP function
45
- from glibc instead of from libssp.so. Our `symbol-check' script will complain if
46
- we link against libssp.so, and thus will ensure that this works properly.
47
-
48
- Taken from:
49
- http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
50
- (package
51
- (inherit xgcc)
52
- (arguments
53
- (substitute-keyword-arguments (package-arguments xgcc)
54
- ((#:make-flags flags)
55
- `(cons " gcc_cv_libc_provides_ssp=yes" ,flags))))))
56
-
57
43
(define (make-gcc-rpath-link xgcc )
58
44
"Given a XGCC package, return a modified package that replace each instance of
59
45
-rpath in the default system spec that's inserted by Guix with -rpath-link"
@@ -71,9 +57,10 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
71
57
((" -rpath=" ) " -rpath-link=" ))
72
58
#t ))))))))
73
59
74
- (define building-on (string-append (list-ref (string-split (%current-system) #\- ) 0 ) " -guix-linux-gnu" ))
60
+ (define building-on (string-append " --build= " (list-ref (string-split (%current-system) #\- ) 0 ) " -guix-linux-gnu" ))
75
61
76
62
(define (explicit-cross-configure package )
63
+ (define building-on (string-append (list-ref (string-split (%current-system) #\- ) 0 ) " -guix-linux-gnu" ))
77
64
(package-with-extra-configure-variable package " --build" building-on))
78
65
79
66
(define (make-cross-toolchain target
@@ -153,26 +140,20 @@ desirable for building Bitcoin Core release binaries."
153
140
base-libc
154
141
base-gcc))
155
142
156
- (define (make-gcc-with-pthreads gcc )
157
- (package-with-extra-configure-variable
158
- (package-with-extra-patches gcc
159
- (search-our-patches " gcc-10-remap-guix-store.patch" ))
160
- " --enable-threads" " posix" ))
161
-
162
- (define (make-mingw-w64-cross-gcc cross-gcc )
163
- (package-with-extra-patches cross-gcc
164
- (search-our-patches " vmov-alignment.patch"
143
+ (define (gcc-mingw-patches gcc )
144
+ (package-with-extra-patches gcc
145
+ (search-our-patches " gcc-remap-guix-store.patch"
146
+ " vmov-alignment.patch"
165
147
" gcc-broken-longjmp.patch" )))
166
148
167
149
(define (make-mingw-pthreads-cross-toolchain target )
168
150
"Create a cross-compilation toolchain package for TARGET"
169
151
(let* ((xbinutils (cross-binutils target))
170
152
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
171
- (pthreads-xgcc (make-gcc-with-pthreads
172
- (cross-gcc target
173
- #:xgcc (make-ssp-fixed-gcc (make-mingw-w64-cross-gcc base-gcc))
153
+ (pthreads-xgcc (cross-gcc target
154
+ #:xgcc (gcc-mingw-patches mingw-w64-base-gcc)
174
155
#:xbinutils xbinutils
175
- #:libc pthreads-xlibc))))
156
+ #:libc pthreads-xlibc)))
176
157
; ; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
177
158
; ; XGCC
178
159
(package
@@ -543,6 +524,22 @@ inspecting signatures in Mach-O binaries.")
543
524
" --enable-stack-protector" " all" )
544
525
" --enable-bind-now" " yes" ))
545
526
527
+ (define-public mingw-w64-base-gcc
528
+ (package
529
+ (inherit base-gcc)
530
+ (arguments
531
+ (substitute-keyword-arguments (package-arguments base-gcc)
532
+ ((#:configure-flags flags)
533
+ `(append ,flags
534
+ ; ; https://gcc.gnu.org/install/configure.html
535
+ (list " --enable-threads=posix" ,
536
+ building-on)))
537
+ ((#:make-flags flags)
538
+ ; ; Uses the SSP functions from glibc instead of from libssp.so.
539
+ ; ; Our 'symbol-check' script will complain if we link against libssp.so,
540
+ ; ; and thus will ensure that this works properly.
541
+ `(cons " gcc_cv_libc_provides_ssp=yes" ,flags))))))
542
+
546
543
(define-public glibc-2.27
547
544
(package
548
545
(inherit glibc-2.31)
0 commit comments