summaryrefslogtreecommitdiff
path: root/gnu/packages/make-bootstrap.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-08-14 15:31:21 +0200
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:45:45 +0200
commit9fe0e5b35307e4392d0297095116933a435b2c48 (patch)
tree9a42604f77e5536051b5f5f3e9550f467914ddc8 /gnu/packages/make-bootstrap.scm
parentc1fbcc748958d3ddd8777df5bd51140199ab80cf (diff)
gnu: make-bootstrap: Build with GCC 11 instead of GCC 7.
This fixes a glibc-for-bootstrap build issue on aarch64-linux. * gnu/packages/make-bootstrap.scm (glibc-for-bootstrap)[native-inputs]: Remove. (gcc-for-bootstrap, package-with-relocatable-glibc) (%gcc-static, %gcc-stripped): Depend on ‘gcc’ instead of ‘gcc-7’. Reported-by: Ricardo Wurmus <rekado@elephly.net> Change-Id: Ia7f62f9674873087aa20a9d7da8d25d94b215e5c
Diffstat (limited to 'gnu/packages/make-bootstrap.scm')
-rw-r--r--gnu/packages/make-bootstrap.scm24
1 files changed, 9 insertions, 15 deletions
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 63c84e93efd..13cf40d37bb 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -87,12 +87,6 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
87 "--enable-static-nss" 87 "--enable-static-nss"
88 ,flags)))) 88 ,flags))))
89 89
90 ;; Make sure to build glibc with the same compiler version as the rest
91 ;; of the bootstrap. Otherwise it fails to statically link on aarch64.
92 (native-inputs
93 `(("gcc" ,gcc-7)
94 ,@(package-native-inputs base)))
95
96 ;; Remove the 'debug' output to allow bit-reproducible builds (when the 90 ;; Remove the 'debug' output to allow bit-reproducible builds (when the
97 ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which 91 ;; 'debug' output is used, ELF files end up with a .gnu_debuglink, which
98 ;; includes a CRC of the corresponding debugging symbols; those symbols 92 ;; includes a CRC of the corresponding debugging symbols; those symbols
@@ -103,13 +97,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
103 (mlambdaq (glibc) 97 (mlambdaq (glibc)
104 "Return a variant of GCC that uses the bootstrap variant of GLIBC." 98 "Return a variant of GCC that uses the bootstrap variant of GLIBC."
105 (package 99 (package
106 (inherit gcc-7) 100 (inherit gcc)
107 (outputs '("out")) ;all in one so libgcc_s is easily found 101 (outputs '("out")) ;all in one so libgcc_s is easily found
108 (inputs 102 (inputs
109 `( ;; Distinguish the name so we can refer to it below. 103 `( ;; Distinguish the name so we can refer to it below.
110 ("bootstrap-libc" ,(glibc-for-bootstrap glibc)) 104 ("bootstrap-libc" ,(glibc-for-bootstrap glibc))
111 ("libc:static" ,(glibc-for-bootstrap glibc) "static") 105 ("libc:static" ,(glibc-for-bootstrap glibc) "static")
112 ,@(package-inputs gcc-7)))))) 106 ,@(package-inputs gcc))))))
113 107
114(define (package-with-relocatable-glibc p) 108(define (package-with-relocatable-glibc p)
115 "Return a variant of P that uses the libc as defined by 109 "Return a variant of P that uses the libc as defined by
@@ -148,7 +142,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
148 (cons (search-path-specification 142 (cons (search-path-specification
149 (variable "CROSS_CPLUS_INCLUDE_PATH") 143 (variable "CROSS_CPLUS_INCLUDE_PATH")
150 (files '("include"))) 144 (files '("include")))
151 (package-search-paths gcc-7))))) 145 (package-search-paths gcc)))))
152 ("cross-binutils" ,(cross-binutils target)) 146 ("cross-binutils" ,(cross-binutils target))
153 ,@(%final-inputs))) 147 ,@(%final-inputs)))
154 `(("libc" ,(glibc-for-bootstrap glibc)) 148 `(("libc" ,(glibc-for-bootstrap glibc))
@@ -472,11 +466,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
472(define %gcc-static 466(define %gcc-static
473 ;; A statically-linked GCC, with stripped-down functionality. 467 ;; A statically-linked GCC, with stripped-down functionality.
474 (package-with-relocatable-glibc 468 (package-with-relocatable-glibc
475 (package (inherit gcc-7) 469 (package (inherit gcc)
476 (name "gcc-static") 470 (name "gcc-static")
477 (outputs '("out")) ; all in one 471 (outputs '("out")) ; all in one
478 (arguments 472 (arguments
479 (substitute-keyword-arguments (package-arguments gcc-7) 473 (substitute-keyword-arguments (package-arguments gcc)
480 ((#:modules modules %default-gnu-modules) 474 ((#:modules modules %default-gnu-modules)
481 `((srfi srfi-1) 475 `((srfi srfi-1)
482 (srfi srfi-26) 476 (srfi srfi-26)
@@ -527,7 +521,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
527 (inputs 521 (inputs
528 `(("zlib:static" ,zlib "static") 522 `(("zlib:static" ,zlib "static")
529 ("isl:static" ,isl "static") 523 ("isl:static" ,isl "static")
530 ,@(package-inputs gcc-7))) 524 ,@(package-inputs gcc)))
531 (native-inputs 525 (native-inputs
532 (if (%current-target-system) 526 (if (%current-target-system)
533 `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both 527 `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -540,13 +534,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
540 ("gmp-native" ,gmp) 534 ("gmp-native" ,gmp)
541 ("mpfr-native" ,mpfr) 535 ("mpfr-native" ,mpfr)
542 ("mpc-native" ,mpc) 536 ("mpc-native" ,mpc)
543 ,@(package-native-inputs gcc-7)) 537 ,@(package-native-inputs gcc))
544 (package-native-inputs gcc-7)))))) 538 (package-native-inputs gcc))))))
545 539
546(define %gcc-stripped 540(define %gcc-stripped
547 ;; The subset of GCC files needed for bootstrap. 541 ;; The subset of GCC files needed for bootstrap.
548 (package 542 (package
549 (inherit gcc-7) 543 (inherit gcc)
550 (name "gcc-stripped") 544 (name "gcc-stripped")
551 (build-system trivial-build-system) 545 (build-system trivial-build-system)
552 (source #f) 546 (source #f)