gnu: Add binutils-muslboot0.

* gnu/packages/commencement.scm (binutils-muslboot0): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Change-Id: I3c0f18f97b60f302620baccab895cebdb332e1c5
This commit is contained in:
Ekaitz Zarraga
2024-10-06 14:21:12 +03:00
committed by Efraim Flashner
parent ae3b592f82
commit bcc53dd092

View File

@@ -1125,6 +1125,67 @@ MesCC-Tools), and finally M2-Planet.")
(native-inputs (modify-inputs (package-native-inputs tcc-musl)
(replace "tcc" tcc-musl)))))
(define binutils-muslboot0
;; The initial Binutils
(package
(inherit binutils)
(name "binutils-muslboot0")
(version "2.30")
(source (bootstrap-origin
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.gz"))
(sha256
(base32
"1sp9g7zrrcsl25hxiqzmmcrdlbm7rbmj0vki18lks28wblcm0f4c")))))
(inputs '())
(propagated-inputs '())
(native-inputs
(modify-inputs (%boot-tcc-inputs)
(replace "tcc" tcc-musl)
(replace "bash" oksh-muslboot0)))
(arguments
(list #:implicit-inputs? #f
#:guile %bootstrap-guile
#:tests? #f ; tests hang forever
#:parallel-build? #f
#:strip-binaries? #f ; no strip yet
#:phases
#~(modify-phases %standard-phases
(add-after 'configure 'fix-build
(lambda _
;; bfd/po doesn't have a Makefile, so the recursive calls just
;; fail. We add files with the same name Make targets have, to
;; trick Make into thinking there's nothing to do.
(call-with-output-file "bfd/po/install"
(lambda (p) (display "" p)))
(call-with-output-file "bfd/po/all"
(lambda (p) (display "" p)))
(call-with-output-file "bfd/po/info"
(lambda (p) (display "" p))))))
#:configure-flags
#~(list
(string-append "CONFIG_SHELL="
(search-input-file %build-inputs "/bin/bash"))
(string-append "SHELL="
(search-input-file %build-inputs "/bin/bash"))
"CFLAGS=-g"
"CC=tcc"
"LD=tcc"
"AR=tcc -ar"
"MAKEINFO=true"
"RANLIB=true"
"--enable-64-bit-bfd"
"--disable-nls"
"--disable-shared"
"--disable-werror"
"--disable-plugins"
"--enable-deterministic-archives"
"--with-sysroot=/"
(string-append "--build=" #$(commencement-build-target))
(string-append "--host=" #$(commencement-build-target)))))))
(define binutils-mesboot0
;; The initial Binutils
(package