gnu: Add glibc-2.2.5.

* gnu/packages/commencement.scm (glibc-mesboot0, gcc-mesboot0,
binutils-mesboot): Export variables.
* gnu/packages/base.scm (glibc-2.2.5): New variable.
This commit is contained in:
Ricardo Wurmus 2022-02-05 00:56:54 +01:00
parent 013086c3db
commit defa85b265
No known key found for this signature in database
GPG key ID: 197A5888235FACAC
2 changed files with 104 additions and 4 deletions

View file

@ -13,7 +13,7 @@
;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018, 2019, 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com> ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net> ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
@ -46,6 +46,7 @@ (define-module (gnu packages base)
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages ed) #:use-module (gnu packages ed)
#:use-module (gnu packages gawk)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (gnu packages guile) #:use-module (gnu packages guile)
#:use-module (gnu packages multiprecision) #:use-module (gnu packages multiprecision)
@ -1014,6 +1015,105 @@ (define-public glibc-2.29
"glibc-reinstate-prlimit64-fallback.patch" "glibc-reinstate-prlimit64-fallback.patch"
"glibc-2.29-supported-locales.patch")))))) "glibc-2.29-supported-locales.patch"))))))
(define-public glibc-2.2.5
(package
(inherit glibc)
(version "2.2.5")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.gz"))
(patches (search-patches "glibc-boot-2.2.5.patch"
"glibc-bootstrap-system-2.2.5.patch"))
(sha256
(base32
"1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
(arguments
(list #:system "i686-linux"
#:implicit-inputs? #f
#:tests? #f
#:strip-binaries? #f
#:validate-runpath? #f
#:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
#:make-flags
#~(list (string-append
"SHELL=" #$(this-package-native-input "bash") "/bin/sh"))
#:configure-flags
#~(list "--enable-shared"
"--enable-static"
"--disable-sanity-checks"
"--build=i686-unknown-linux-gnu"
"--host=i686-unknown-linux-gnu"
(string-append "--with-headers="
#$(this-package-native-input "kernel-headers")
"/include")
"--enable-static-nss"
"--without-__thread"
"--without-cvs"
"--without-gd"
"--without-tls"
(string-append "--prefix=" #$output))
#:phases
#~(modify-phases %standard-phases
(add-before 'configure 'setenv
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bash (assoc-ref inputs "bash"))
(shell (string-append bash "/bin/bash"))
(gcc (assoc-ref inputs "gcc"))
(cppflags (string-append
" -D MES_BOOTSTRAP=1"
" -D BOOTSTRAP_GLIBC=1"))
(cflags (string-append " -L " (getcwd))))
(setenv "CONFIG_SHELL" shell)
(setenv "SHELL" shell)
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags)))))
(replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
"running ./configure ~a\n" (string-join configure-flags))
(apply invoke "./configure" configure-flags)))
(add-after 'configure 'fixup-configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bash (assoc-ref inputs "bash"))
(shell (string-append bash "/bin/bash")))
(substitute* "config.make"
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
(substitute* "config.make"
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
(("BASH = ") (string-append
"SHELL = " shell "
BASH = ")))))))))
(supported-systems '("i686-linux" "x86_64-linux"))
(outputs '("out"))
(inputs '())
(propagated-inputs '())
(native-inputs
;; Lazily resolve NAME in (gnu packages commencement) to avoid a cycle.
(let ((c (lambda (name)
(module-ref (resolve-interface
'(gnu packages commencement))
name))))
`(("bash" ,bash-minimal)
("coreutils" ,coreutils)
("gawk" ,gawk)
("grep" ,grep)
("make" ,gnu-make)
("sed" ,sed)
("tar" ,tar)
("bzip2" ,bzip2)
("gzip" ,gzip)
("patch" ,patch)
("xz" ,xz)
("kernel-headers" ,linux-libre-headers)
;; Old toolchain
("gcc" ,(c 'gcc-mesboot0))
("binutils" ,(c 'binutils-mesboot))
("libc" ,(c 'glibc-mesboot0)))))))
(define-public (make-gcc-libc base-gcc libc) (define-public (make-gcc-libc base-gcc libc)
"Return a GCC that targets LIBC." "Return a GCC that targets LIBC."
(package (inherit base-gcc) (package (inherit base-gcc)

View file

@ -1264,7 +1264,7 @@ (define gawk-mesboot0
(install-file "gawk" bin) (install-file "gawk" bin)
(symlink "gawk" (string-append bin "/awk")))))))))) (symlink "gawk" (string-append bin "/awk"))))))))))
(define glibc-mesboot0 (define-public glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer ;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
;; gcc. ;; gcc.
@ -1358,7 +1358,7 @@ (define glibc-mesboot0
"SHELL = " shell " "SHELL = " shell "
BASH = "))))))))))) BASH = ")))))))))))
(define gcc-mesboot0 (define-public gcc-mesboot0
(package (package
(inherit gcc-core-mesboot0) (inherit gcc-core-mesboot0)
(name "gcc-mesboot0") (name "gcc-mesboot0")
@ -1992,7 +1992,7 @@ (define hello-mesboot
(lambda _ (lambda _
(invoke "./hello")))))))) (invoke "./hello"))))))))
(define binutils-mesboot (define-public binutils-mesboot
(package (package
(inherit binutils) (inherit binutils)
(name "binutils-mesboot") (name "binutils-mesboot")