summaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm402
1 files changed, 150 insertions, 252 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e7bd6cf002..fb028390a2 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,15 +1,17 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,12 +51,13 @@
#:use-module (gnu packages shells)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages pkg-config)
- #:use-module (gnu packages rsync)
#:use-module (gnu packages xml)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix memoization)
#:use-module (guix utils)
@@ -116,8 +119,7 @@
(guile-dir (assoc-ref inputs "guile"))
(guile (string-append guile-dir "/bin/guile")))
(invoke guile "--no-auto-compile" source)
- (chdir "bootar")
- #t)))
+ (chdir "bootar"))))
(replace 'configure (bootstrap-configure ,version "." "scripts"))
(replace 'build (bootstrap-build "."))
(replace 'install (bootstrap-install "." "scripts"))))))
@@ -163,8 +165,7 @@ pure Scheme to Tar and decompression in one easy step.")
(symlink (string-append out "/bin/gash")
(string-append out "/bin/sh"))
(symlink (string-append out "/bin/gash")
- (string-append out "/bin/bash"))
- #t)))))))
+ (string-append out "/bin/bash")))))))))
(inputs `(("guile" ,%bootstrap-guile)))
(native-inputs `(("bootar" ,bootar)))))
@@ -190,8 +191,7 @@ pure Scheme to Tar and decompression in one easy step.")
(lambda* (#:key inputs #:allow-other-keys)
(let ((gash (assoc-ref inputs "gash")))
(add-to-load-path (string-append gash "/share/guile/site/"
- (effective-version))))
- #t))
+ (effective-version))))))
(add-before 'configure 'pre-configure
(lambda _
(format #t "Creating gash/commands/testb.scm~%")
@@ -217,8 +217,7 @@ pure Scheme to Tar and decompression in one easy step.")
(copy-file "scripts/template.in" "scripts/[.in")
(substitute* "scripts/[.in"
(("@UTILITY@") "testb"))
- (delete-file "scripts/template.in")
- #t))
+ (delete-file "scripts/template.in")))
(replace 'configure
(bootstrap-configure ,(package-version gash-utils)
"gash" "scripts"))
@@ -247,8 +246,7 @@ pure Scheme to Tar and decompression in one easy step.")
(copy-file (string-append gash-godir "/gash/compat.go")
(string-append godir "/gash/compat.go"))
(copy-recursively (string-append gash-godir "/gash/compat")
- (string-append godir "/gash/compat"))
- #t)))))))
+ (string-append godir "/gash/compat")))))))))
(inputs `(("gash" ,gash-boot)
("guile" ,%bootstrap-guile)))
(native-inputs `(("bootar" ,bootar)))))
@@ -438,8 +436,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(string-suffix? ".s" name))))))
(for-each (lambda (x) (install-file x cache))
(append (objects-in-dir ".")
- (objects-in-dir "mescc-lib"))))
- #t)))))
+ (objects-in-dir "mescc-lib")))))))))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -573,8 +570,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "util.c"
- (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe")))
- #t))
+ (("^char [*]strlwr" all) (string-append all "_tcc_cannot_handle_dupe")))))
(replace 'build
(lambda _
(let ((files '("bits" "crypt" "deflate" "getopt" "gzip"
@@ -636,13 +632,11 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(lambda _
(substitute* "build.sh.in"
(("@LIBOBJS@") "getloadavg.o")
- (("@REMOTE@") "stub"))
- #t))
+ (("@REMOTE@") "stub"))))
(add-after 'configure 'configure-fixup
(lambda _
(substitute* "make.h"
- (("^extern long int lseek.*" all) (string-append "// " all)))
- #t))
+ (("^extern long int lseek.*" all) (string-append "// " all)))))
(replace 'build
(lambda _
(invoke "sh" "./build.sh")))
@@ -694,16 +688,14 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(("uTimBuf[.]" all)
(string-append "// " all))
(("retVal = utime [(] dstName, &uTimBuf [)];" all)
- (string-append "retVal = 0; // " all)))
- #t))
+ (string-append "retVal = 0; // " all)))))
(replace 'configure
(lambda _
(with-output-to-file "utime.h"
(lambda _ (display "
#define fchown(filedes, owner, group) 0
#define fchmod(filedes, mode) 0
-")))
- #t))
+")))))
(replace 'check
(lambda _
(invoke "./bzip2" "--help")))
@@ -759,8 +751,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(setenv "CC" "tcc")
(setenv "LD" "tcc")
(setenv "AR" "tcc -ar")
- (setenv "CFLAGS" "-D _POSIX_VERSION=1")
- #t)))
+ (setenv "CFLAGS" "-D _POSIX_VERSION=1"))))
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "Makefile.in"
@@ -773,8 +764,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(substitute* "lib/sh/snprintf.c"
(("^#if (defined [(]HAVE_LOCALE_H[)])" all define) (string-append "#if 0 //" define)))
(substitute* "configure"
- ((" egrep") " grep"))
- #t))
+ ((" egrep") " grep"))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(let ((configure-flags (filter (lambda (x)
@@ -789,20 +779,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(substitute* "config.h"
(("#define GETCWD_BROKEN 1") "#undef GETCWD_BROKEN"))
(let ((config.h (open-file "config.h" "a")))
- (display (string-append
- ;; XXX TODO: remove nested ,(string-append ...) and
- ;; store file name on next rebuild cycle
- ,(string-append "
+ (display "
// tcc: error: undefined symbol 'enable_hostname_completion'
#define enable_hostname_completion(on_or_off) 0
-// /gnu/store/" "cq0cmv35s9dhilx14zaghlc08gpc0hwr-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
+// /gnu/store/…-tcc-boot0-0.9.26-6.c004e9a/lib/libc.a: error: 'sigprocmask' defined twice
#define HAVE_POSIX_SIGNALS 1
#define endpwent(x) 0
-"))
+"
config.h)
- (close config.h))
- #t))
+ (close config.h))))
(replace 'check
(lambda _
(invoke "./bash" "--version")))
@@ -812,8 +798,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))
- #t))))))))
+ (copy-file "bash" (string-append bin "/sh"))))))))))
(define tcc-boot
;; The final tcc.
@@ -846,8 +831,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(copy-file source "tarball.tar.bz2")
(invoke "bzip2" "-d" "tarball.tar.bz2")
(invoke "tar" "xvf" "tarball.tar")
- (chdir (string-append "tcc-" ,version))
- #t))
+ (chdir (string-append "tcc-" ,version))))
;; no patch yet
;; (add-after 'unpack 'apply-boot-patch
;; (lambda* (#:key inputs #:allow-other-keys)
@@ -858,8 +842,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(substitute* "libtcc.c"
(("s->alacarte_link = 1;" all)
(string-append all "
- s->static_link = 1;")))
- #t))
+ s->static_link = 1;")))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
@@ -919,57 +902,8 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
(copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
- (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
- #t)))))))))
-
-(define diffutils-mesboot
- ;; The initial diffutils.
- (package
- (inherit diffutils)
- (name "diffutils-mesboot")
- (version "2.7")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/diffutils/diffutils-"
- version ".tar.gz"))
- (sha256
- (base32
- "1mirn5i825bn5w7rh6mgn0r8aj9xqanav95dwcl1b8sn82f4iwnm"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:parallel-build? #f
- #:tests? #f ; check is naive, also checks non-built PROGRAMS
- #:strip-binaries? #f ; no strip yet
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'remove-diff3-sdiff
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "Makefile.in"
- (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "CC" "tcc")
- (setenv "LD" "tcc")
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply invoke (cons "./configure" configure-flags)))))
- (replace 'install
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bin (string-append out "/bin")))
- (mkdir-p bin)
- (install-file "cmp" bin)
- (install-file "diff" bin)
- #t))))))))
+ (copy-file "libtcc1.a"
+ (string-append out "/lib/tcc/libtcc1.a")))))))))))
(define patch-mesboot
;; The initial patch.
@@ -1002,8 +936,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
;; avoid another segfault
(substitute* "pch.c"
(("while [(]p_end >= 0[)]" all)
- "p_end = -1;\nwhile (0)"))
- #t))
+ "p_end = -1;\nwhile (0)"))))
;; FIXME: no compressing gzip yet
(delete 'compress-documentation))))))
@@ -1039,8 +972,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(bash (assoc-ref %build-inputs "bash"))
(shell (string-append bash "/bin/bash")))
(substitute* "configure"
- (("/bin/sh") shell))
- #t)))
+ (("/bin/sh") shell)))))
(replace 'check
(lambda _
(invoke "./sed" "--version")))
@@ -1048,16 +980,16 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(lambda _
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (install-file "sed" bin)
- #t))))))))
+ (install-file "sed" bin)))))))))
(define (%boot-tcc-inputs)
`(("bash" ,bash-mesboot0)
("bzip2" ,bzip2-mesboot)
- ("diffutils" ,diffutils-mesboot)
("gzip" ,gzip-mesboot)
("patch" ,patch-mesboot)
("sed" ,sed-mesboot0)
+ ;; Place lower than sed so we don't override it.
+ ("gash-utils" ,gash-utils-boot)
("tcc" ,tcc-boot)
,@(alist-delete "tcc" (%boot-tcc0-inputs))))
@@ -1105,14 +1037,12 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(setenv "SHELL" shell)
(setenv "AR" "tcc -ar")
(setenv "RANLIB" "true")
- (setenv "CC" "tcc -D __GLIBC_MINOR__=6")
- #t)))
+ (setenv "CC" "tcc -D __GLIBC_MINOR__=6"))))
(add-after 'unpack 'scripted-patch
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "bfd/configure"
(("^sed -e '/SRC-POTFILES.*" all)
- "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))
- #t))
+ "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' > po/Makefile\n"))))
(replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
@@ -1184,8 +1114,7 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(add-after 'unpack 'apply-boot-patch
(lambda* (#:key inputs #:allow-other-keys)
(let ((patch-file (assoc-ref inputs "boot-patch")))
- (system* "patch" "--force" "-p1" "-i" patch-file)
- #t)))
+ (system* "patch" "--force" "-p1" "-i" patch-file))))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1233,8 +1162,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(invoke "ar" "x" (string-append tcc "/lib/libtcc1.a"))
(invoke "ar" "x" (string-append tcc "/lib/libc.a"))
(invoke "ar" "r" (string-append gcc-dir "/libc.a")
- "libc.o" "libtcc1.o")
- #t))))))
+ "libc.o" "libtcc1.o")))))))
(native-search-paths
(list (search-path-specification
(variable "C_INCLUDE_PATH")
@@ -1277,8 +1205,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(headers (assoc-ref %build-inputs "kernel-headers")))
(mkdir-p include)
(copy-recursively "include" out)
- (copy-recursively headers out)
- #t))))))))
+ (copy-recursively headers out)))))))))
(define gawk-mesboot0
;; The initial Gawk.
@@ -1329,8 +1256,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(setenv "CPP" "tcc -E")
(setenv "LD" "tcc")
(setenv "ac_cv_func_getpgrp_void" "yes")
- (setenv "ac_cv_func_tzset" "yes"))
- #t))
+ (setenv "ac_cv_func_tzset" "yes"))))
(replace 'configure ; needs classic invocation of configure
(lambda* (#:key configure-flags #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
@@ -1345,8 +1271,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))
- #t))))))))
+ (symlink "gawk" (string-append bin "/awk"))))))))))
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
@@ -1423,8 +1348,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(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))
- #t)))
+ (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)
@@ -1441,8 +1365,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
(("BASH = ") (string-append
"SHELL = " shell "
- BASH = ")))
- #t))))))))
+ BASH = ")))))))))))
(define gcc-mesboot0
(package
@@ -1465,8 +1388,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda _
(display "
ac_cv_c_float_format='IEEE (little-endian)'
-")))
- #t))
+")))))
(replace 'install2
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1543,14 +1465,12 @@ ac_cv_c_float_format='IEEE (little-endian)'
(substitute* "configure"
((" /bin/sh") shell)))
(substitute* "Makefile.in"
- (("^SUBDIRS = doc") "SUBDIRS ="))
- #t))
+ (("^SUBDIRS = doc") "SUBDIRS ="))))
(replace 'install
(lambda _
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin")))
- (install-file "src/tar" bin)
- #t))))))))
+ (install-file "src/tar" bin)))))))))
(define grep-mesboot
;; The initial grep.
@@ -1587,8 +1507,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(bin (string-append out "/bin")))
(install-file "grep" bin)
(symlink "grep" (string-append bin "/egrep"))
- (symlink "grep" (string-append bin "/fgrep"))
- #t))))))))
+ (symlink "grep" (string-append bin "/fgrep"))))))))))
(define binutils-mesboot1
(package
@@ -1613,8 +1532,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref %outputs "out"))
(bash (assoc-ref %build-inputs "bash"))
(shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- #t)))))))))
+ (setenv "CONFIG_SHELL" shell))))))))))
(define coreutils-mesboot0
(package
@@ -1677,8 +1595,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
- (install-file "make" bin)
- #t))))))))
+ (install-file "make" bin)))))))))
(define gawk-mesboot
(package
@@ -1713,8 +1630,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "gawk" bin)
- (symlink "gawk" (string-append bin "/awk"))
- #t))))))))
+ (symlink "gawk" (string-append bin "/awk"))))))))))
(define sed-mesboot
(package
@@ -1745,8 +1661,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(shell (string-append bash "/bin/bash")))
(substitute* "testsuite/Makefile.tests"
(("^SHELL = /bin/sh")
- (string-append "SHELL = " shell)))
- #t))))))))
+ (string-append "SHELL = " shell)))))))))))
(define bash-mesboot
(package
@@ -1789,14 +1704,12 @@ ac_cv_c_float_format='IEEE (little-endian)'
(add-after 'unpack 'scripted-patch
(lambda _
(substitute* "shell.c"
- ((";;") ";"))
- #t))
+ ((";;") ";"))))
(add-before 'configure 'setenv
(lambda _
(setenv "AWK" "gawk")
(setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
- (setenv "gl_cv_func_rename_dest_works" "yes")
- #t))
+ (setenv "gl_cv_func_rename_dest_works" "yes")))
(add-after 'configure 'configure-fixups
(lambda _
(let ((config.h (open-file "config.h" "a")))
@@ -1804,8 +1717,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
#define enable_hostname_completion(on_or_off) 0
")
config.h)
- (close config.h))
- #t))
+ (close config.h))))
(replace 'check
(lambda _
(invoke "./bash" "--version")))
@@ -1815,8 +1727,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(bin (string-append out "/bin")))
(mkdir-p bin)
(copy-file "bash" (string-append bin "/bash"))
- (copy-file "bash" (string-append bin "/sh"))
- #t))))))))
+ (copy-file "bash" (string-append bin "/sh"))))))))))
(define (%boot-mesboot1-inputs)
`(("bash" ,bash-mesboot)
@@ -1942,8 +1853,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda* (#:key inputs #:allow-other-keys)
(let ((patch-file (assoc-ref inputs "boot-patch")))
(format (current-error-port) "patch file=~s\n" patch-file)
- (system* "patch" "--force" "-p1" "-i" patch-file))
- #t))
+ (system* "patch" "--force" "-p1" "-i" patch-file))))
;; c&p from commencement.scm:gcc-boot0
(add-after 'unpack 'unpack-gmp&co
(lambda* (#:key inputs #:allow-other-keys)
@@ -1967,8 +1877,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-boot mpfr-boot mpc-boot))
- #t)))
+ (list gmp-boot mpfr-boot mpc-boot)))))
(add-before 'configure 'setenv
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -1986,8 +1895,8 @@ ac_cv_c_float_format='IEEE (little-endian)'
(setenv "LIBRARY_PATH" (string-append glibc "/lib"
":" gcc "/lib"))
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t))))))))
+ (format (current-error-port) "LIBRARY_PATH=~a\n"
+ (getenv "LIBRARY_PATH"))))))))))
(define gcc-mesboot1
(package
@@ -2017,8 +1926,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(add-before 'unpack 'unpack-g++
(lambda _
(let ((source-g++ (assoc-ref %build-inputs "gcc-g++")))
- (invoke "tar" "xvf" source-g++))
- #t))
+ (invoke "tar" "xvf" source-g++))))
(replace 'setenv
(lambda _
(setenv "CONFIG_SHELL" (which "sh"))
@@ -2030,8 +1938,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; Set the C++ search path so that C headers can be found as
;; libstdc++ is being compiled.
- (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
- #t))))))))
+ (setenv "CPLUS_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))))))))
(define (%boot-mesboot2-inputs)
`(("gcc" ,gcc-mesboot1)
@@ -2172,8 +2079,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(substitute* "gprof/Makefile.in"
(("^SUBDIRS = po") "SUBDIRS ="))
(substitute* "ld/Makefile.in"
- (("^SUBDIRS = po") "SUBDIRS ="))
- #t)))))))
+ (("^SUBDIRS = po") "SUBDIRS =")))))))))
(define (%boot-mesboot3-inputs)
`(("binutils" ,binutils-mesboot)
@@ -2225,8 +2131,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(replace 'unpack
(lambda* (#:key source #:allow-other-keys)
(invoke "tar" "xvf" source)
- (chdir (string-append "glibc-" ,version))
- #t))
+ (chdir (string-append "glibc-" ,version))))
(replace 'setenv
(lambda* (#:key inputs #:allow-other-keys)
(let* ((headers (assoc-ref inputs "headers"))
@@ -2248,15 +2153,13 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; avoid -fstack-protector
(setenv "libc_cv_ssp" "false")
(substitute* "configure"
- (("/bin/pwd") "pwd"))
- #t)))
+ (("/bin/pwd") "pwd")))))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out")))
- (and (apply invoke "make" make-flags)
- (copy-recursively kernel-headers out)
- #t))))
+ (apply invoke "make" make-flags)
+ (copy-recursively kernel-headers out))))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
@@ -2285,8 +2188,7 @@ SHELL := " shell "
(invoke "make" (string-append (getcwd) "/sysd-sorted" ))
(substitute* "sysd-sorted"
((" sunrpc") " ")
- ((" nis") " "))
- #t)))))))))
+ ((" nis") " ")))))))))))
(define glibc-mesboot
(package
@@ -2307,9 +2209,8 @@ SHELL := " shell "
(let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out"))
(install-flags (cons "install" make-flags)))
- (and (apply invoke "make" install-flags)
- (copy-recursively kernel-headers out)
- #t)))))))))))
+ (apply invoke "make" install-flags)
+ (copy-recursively kernel-headers out)))))))))))
(define (%boot-mesboot4-inputs)
`(("libc" ,glibc-mesboot)
@@ -2364,8 +2265,7 @@ exec " gcc "/bin/" program
"g++"
"i686-unknown-linux-gnu-cpp"
"i686-unknown-linux-gnu-gcc"
- "i686-unknown-linux-gnu-g++"))
- #t)))
+ "i686-unknown-linux-gnu-g++")))))
(replace 'check
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -2380,7 +2280,6 @@ exec " gcc "/bin/" program
(version (package-version gcc-4.9))
(source (bootstrap-origin (package-source gcc-4.9)))
(native-inputs `(("gcc-wrapper" ,gcc-mesboot1-wrapper)
- ("gcc" ,gcc-mesboot1)
("headers" ,glibc-headers-mesboot)
,@(%boot-mesboot4-inputs)))
(arguments
@@ -2453,8 +2352,8 @@ exec " gcc "/bin/" program
":" gcc "/lib"))
(format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
(format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t))))))))))
+ (format (current-error-port) "LIBRARY_PATH=~a\n"
+ (getenv "LIBRARY_PATH"))))))))))))
(define gcc-mesboot-wrapper
;; We need this so gcc-mesboot can be used to create shared binaries that
@@ -2506,6 +2405,7 @@ exec " gcc "/bin/" program
(define gnu-make-boot0
(package
(inherit gnu-make)
+ (outputs (delete "debug" (package-outputs gnu-make)))
(source (bootstrap-origin (package-source gnu-make)))
(name "make-boot0")
(arguments
@@ -2517,7 +2417,16 @@ exec " gcc "/bin/" program
;; The generated config.status has some problems due to the
;; bootstrap environment. Disable dependency tracking to work
;; around it.
- `(cons "--disable-dependency-tracking" ,flags))
+ `(cons "--disable-dependency-tracking"
+
+ ;; 'glibc-bootstrap' on non-x86 platforms has a buggy
+ ;; 'posix_spawn'. Thus, disable it. See
+ ;; <https://bugs.gnu.org/49367>.
+ ,(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ flags)
+ (_
+ `(cons "--disable-posix-spawn" ,flags)))))
((#:phases phases)
`(modify-phases ,phases
(replace 'build
@@ -2527,8 +2436,7 @@ exec " gcc "/bin/" program
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
- (install-file "make" bin)
- #t))))))))
+ (install-file "make" bin)))))))))
(native-inputs '()) ; no need for 'pkg-config'
(inputs (%bootstrap-inputs+toolchain))))
@@ -2549,6 +2457,7 @@ exec " gcc "/bin/" program
(define coreutils-boot0
(package
(inherit coreutils)
+ (outputs (delete "debug" (package-outputs coreutils)))
(source (bootstrap-origin (package-source coreutils)))
(name "coreutils-boot0")
(native-inputs `())
@@ -2594,6 +2503,8 @@ exec " gcc "/bin/" program
,@(%bootstrap-inputs+toolchain)))
(arguments
`(#:implicit-inputs? #f
+ ;; Ignore test failure in gnulib for armhf/aarch64.
+ #:tests? ,(not (target-arm?))
#:guile ,%bootstrap-guile
;; The build system assumes we have done a mistake when time_t is 32-bit
@@ -2608,7 +2519,20 @@ exec " gcc "/bin/" program
((or "arm-linux" "aarch64-linux")
''("--disable-dependency-tracking"))
(_ ''()))
- ,flags)))))))
+ ,flags))
+ ((#:phases phases '%standard-phases)
+ `(modify-phases ,phases
+ ;; 'test-fnmatch' fails when using glibc-mesboot@2.16, due
+ ;; to incorrect handling of the [:alpha:] regexp character
+ ;; class. Ignore it.
+ ,@(if (member (%current-system)
+ '("x86_64-linux" "i686-linux"))
+ '((add-before 'check 'skip-fnmatch-test
+ (lambda _
+ (substitute* "gnulib-tests/Makefile"
+ (("^XFAIL_TESTS =")
+ "XFAIL_TESTS = test-fnmatch ")))))
+ '()))))))))
(define file
(package
@@ -2640,7 +2564,7 @@ exec " gcc "/bin/" program
(define gawk-boot0
(package
- (inherit patch)
+ (inherit gawk)
(source (bootstrap-origin (package-source gawk)))
(name "gawk-boot0")
(native-inputs '())
@@ -2753,8 +2677,7 @@ exec " gcc "/bin/" program
(with-directory-excursion (string-append out "/bin")
(for-each (lambda (name)
(symlink name (remove-triplet-prefix name)))
- (scandir "." has-triplet-prefix?)))
- #t))))
+ (scandir "." has-triplet-prefix?)))))))
,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
@@ -2789,8 +2712,7 @@ exec " gcc "/bin/" program
;; fail, which in turn confuses the configure script.
(lambda _
(substitute* "libstdc++-v3/configure"
- (("g\\+\\+ -v") "true"))
- #t))))))
+ (("g\\+\\+ -v") "true"))))))))
(_ (package-arguments lib)))))
(inputs (%boot0-inputs))
(native-inputs '()))))
@@ -2799,6 +2721,7 @@ exec " gcc "/bin/" program
(package
(inherit gcc)
(name "gcc-cross-boot0")
+ (outputs (delete "debug" (package-outputs gcc)))
(source (bootstrap-origin (package-source gcc)))
(arguments
`(#:guile ,%bootstrap-guile
@@ -2819,13 +2742,6 @@ exec " gcc "/bin/" program
"--disable-shared"
"--enable-languages=c,c++"
- ;; boot-triplet inserts "guix" in the triplet.
- ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet))
- ;; On POWER9 (little endian) glibc needs the
- ;; 128-bit long double type.
- '("--with-long-double-128")
- '())
-
;; libstdc++ cannot be built at this stage
;; ("Link tests are not allowed after
;; GCC_NO_EXECUTABLES.").
@@ -2879,8 +2795,7 @@ exec " gcc "/bin/" program
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-6.0 mpfr mpc))
- #t)))
+ (list gmp-6.0 mpfr mpc)))))
,(match (%current-system)
((or "i686-linux" "x86_64-linux")
'(add-before 'configure 'fix-libcc1
@@ -2893,8 +2808,7 @@ exec " gcc "/bin/" program
(assoc-ref inputs "gcc") "/lib")))
;; XXX: "g++ -v" is broken (see also libstdc++ above).
(substitute* "libcc1/configure"
- (("g\\+\\+ -v") "true"))
- #t)))
+ (("g\\+\\+ -v") "true")))))
(_ '(add-before 'configure 'return-true
(lambda _ #t))))
(add-after 'install 'symlink-libgcc_eh
@@ -2906,8 +2820,7 @@ exec " gcc "/bin/" program
(string-append out "/lib/gcc/"
,(boot-triplet)
"/" ,(package-version gcc))
- (symlink "libgcc.a" "libgcc_eh.a"))
- #t))))))))
+ (symlink "libgcc.a" "libgcc_eh.a"))))))))))
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
("mpfr-source" ,(bootstrap-origin (package-source mpfr)))
@@ -2948,8 +2861,7 @@ exec " gcc "/bin/" program
(lambda _
(substitute* "Configure"
(("^libswanted=(.*)pthread" _ before)
- (string-append "libswanted=" before)))
- #t))))
+ (string-append "libswanted=" before)))))))
;; Do not configure with '-Dusethreads' since pthread
;; support is missing.
((#:configure-flags configure-flags)
@@ -2992,6 +2904,15 @@ exec " gcc "/bin/" program
"RANLIB=ranlib -D"))
"V=1")
+ ;; 'glibc-bootstrap' on non-x86 platforms has a buggy 'posix_spawn'.
+ ;; Thus, use the Gnulib replacement instead. See
+ ;; <https://bugs.gnu.org/49367>.
+ ,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ '())
+ (_
+ '(#:configure-flags '("gl_cv_func_posix_spawn_works=no"))))
+
,@(package-arguments bison)))))
(define flex-boot0
@@ -3006,15 +2927,6 @@ exec " gcc "/bin/" program
#:guile ,%bootstrap-guile
#:tests? #f))))
-(define rsync-boot0
- (package
- (inherit rsync)
- (native-inputs `(("perl" ,perl-boot0)))
- (inputs (%boot0-inputs))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile))))
-
(define-syntax define/system-dependent
(lambda (s)
"Bind IDENTIFIER to EXP, where the value of EXP is known to depend on
@@ -3050,9 +2962,6 @@ memoized as a function of '%current-system'."
;; Flex and Bison are required since version 4.16.
("flex" ,flex-boot0)
("bison" ,bison-boot0)
-
- ;; Rsync is required since version 5.3.
- ("rsync" ,rsync-boot0)
,@(%boot0-inputs)))))
(define with-boot0
@@ -3155,6 +3064,7 @@ memoized as a function of '%current-system'."
(package
(inherit expat)
(inputs (%boot0-inputs))
+ (outputs '("out"))
(arguments
;; XXX: Linking 'runtestscpp' fails with things like:
;;
@@ -3169,6 +3079,7 @@ memoized as a function of '%current-system'."
;; Since we're not passing the right -Wl,-rpath flags, build the
;; static library to avoid RUNPATH validation failure.
`(cons "--disable-shared" ,flags))
+ ((#:phases phases) '%standard-phases)
((#:tests? _ #f) #f))))))
(define python-boot0
@@ -3195,11 +3106,17 @@ memoized as a function of '%current-system'."
(substitute* "Modules/Setup.dist"
;; Link Expat instead of embedding the bundled one.
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
- #t)))))
+ ;; Delete windows binaries
+ (for-each delete-file
+ (find-files "Lib/distutils/command" ".*.exe$"))
+ (for-each delete-file
+ (find-files "Lib/ensurepip" ".*.whl$")))))))
(inputs
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
- (native-inputs '()) ;and pkg-config
+ (native-inputs ;and pkg-config
+ `(("sitecustomize.py" ,(local-file (search-auxiliary-file
+ "python/sitecustomize.py")))))
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
@@ -3224,6 +3141,7 @@ memoized as a function of '%current-system'."
('add-after unpack apply-alignment-patch _))
`(modify-phases ,original-phases ,@changes))
(_ phases)))
+ (delete 'remove-windows-binaries)
(add-before 'configure 'disable-modules
(lambda _
(substitute* "setup.py"
@@ -3231,18 +3149,21 @@ memoized as a function of '%current-system'."
(("extensions\\.append\\(ctypes\\)") "")
;; Prevent the 'ossaudiodev' extension from being
;; built, since it requires Linux headers.
- (("'linux', ") ""))
- #t))
+ (("'linux', ") ""))))
(delete 'set-TZDIR)
,@(if (hurd-system?)
`((add-before 'build 'fix-regen
(lambda* (#:key inputs #:allow-other-keys)
(let ((libc (assoc-ref inputs "libc")))
(substitute* "Lib/plat-generic/regen"
- (("/usr/include/") (string-append libc "/include/")))
- #t))))
- '())))
- ((#:tests? _ #f) #f))))))
+ (("/usr/include/")
+ (string-append libc "/include/")))))))
+ '())
+ (replace 'install-sitecustomize.py
+ ,(customize-site version))))
+ ((#:tests? _ #f) #f))))
+ (native-search-paths
+ (list (guix-pythonpath-search-path version)))))
(define/system-dependent ld-wrapper-boot0
;; The first 'ld' wrapper, defined with 'define/system-dependent' because
@@ -3272,6 +3193,7 @@ memoized as a function of '%current-system'."
(package
(inherit glibc)
(name "glibc-intermediate")
+ (outputs (delete "debug" (package-outputs glibc)))
(source (bootstrap-origin (package-source glibc)))
(arguments
`(#:guile ,%bootstrap-guile
@@ -3289,9 +3211,9 @@ memoized as a function of '%current-system'."
`(modify-phases ,phases
(add-before 'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys)
- ;; Don't clobber CPATH with the bootstrap libc.
- (setenv "NATIVE_CPATH" (getenv "CPATH"))
- (unsetenv "CPATH")
+ ;; Don't clobber include paths with the bootstrap libc.
+ (unsetenv "C_INCLUDE_PATH")
+ (unsetenv "CPLUS_INCLUDE_PATH")
;; Tell 'libpthread' where to find 'libihash' on Hurd systems.
,@(if (hurd-system?)
@@ -3301,25 +3223,13 @@ memoized as a function of '%current-system'."
(string-append "LDLIBS-pthread.so = "
(assoc-ref %build-inputs "kernel-headers")
"/lib/libihash.a\n"))))
- '())
-
- ;; 'rpcgen' needs native libc headers to be built.
- (substitute* "sunrpc/Makefile"
- (("sunrpc-CPPFLAGS =.*" all)
- (string-append "CPATH = $(NATIVE_CPATH)\n"
- "export CPATH\n"
- all "\n")))
- #t)))))))
+ '()))))))))
(propagated-inputs `(("kernel-headers" ,(kernel-headers-boot0))))
(native-inputs
`(("bison" ,bison-boot0)
("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)
- ("python" ,python-boot0)
- ,@(if (target-powerpc?)
- `(("powerpc64le-patch" ,@(search-patches
- "glibc-ldd-powerpc.patch")))
- '())))
+ ("python" ,python-boot0)))
(inputs
`( ;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
@@ -3330,9 +3240,6 @@ memoized as a function of '%current-system'."
`(("mig" ,mig-boot0))
'())
- ;; A native GCC is needed to build `cross-rpcgen'.
- ("native-gcc" ,@(assoc-ref (%boot0-inputs) "gcc"))
-
;; Here, we use the bootstrap Bash, which is not satisfactory
;; because we don't want to depend on bootstrap tools.
("static-bash" ,@(assoc-ref (%boot0-inputs) "bash"))))))
@@ -3380,9 +3287,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
triplet "-" tool)
tool))
'("ar" "ranlib"))
- (for-each wrap-program '("gcc" "g++")))
-
- #t))))
+ (for-each wrap-program '("gcc" "g++")))))))
(native-inputs
`(("binutils" ,binutils)
("gcc" ,gcc)
@@ -3445,16 +3350,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; Build only the tools.
(add-after 'unpack 'chdir
(lambda _
- (chdir "gettext-tools")
- #t))
+ (chdir "gettext-tools")))
;; Some test programs require pthreads, which we don't have.
(add-before 'configure 'no-test-programs
(lambda _
(substitute* "tests/Makefile.in"
(("^PROGRAMS =.*$")
- "PROGRAMS =\n"))
- #t)))))))
+ "PROGRAMS =\n")))))))))
(define glibc-final
;; The final glibc, which embeds the statically-linked Bash built above.
@@ -3470,10 +3373,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; This time we need 'msgfmt' to install all the libc.mo files.
(native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
- ,@(if (target-powerpc?)
- `(("powerpc64le-patch" ,@(search-patches
- "glibc-ldd-powerpc.patch")))
- '())
("gettext" ,gettext-boot0)))
(propagated-inputs
@@ -3484,7 +3383,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; if 'allowed-references' were per-output.
(arguments
`(#:allowed-references
- ((,gcc-boot0 "lib")
+ (,(gexp-input gcc-boot0 "lib")
,(kernel-headers-boot0)
,static-bash-for-glibc
,@(if (hurd-system?)
@@ -3635,8 +3534,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-6.0 mpfr mpc))
- #t))))))))
+ (list gmp-6.0 mpfr mpc))))))))))
;; This time we want Texinfo, so we get the manual. Add
;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of
@@ -3925,7 +3823,7 @@ is the GNU Compiler Collection.")
(make-gcc-toolchain gcc-6))
(define-public gcc-toolchain-7
- gcc-toolchain)
+ (make-gcc-toolchain gcc-7))
(define-public gcc-toolchain-8
(make-gcc-toolchain gcc-8))
@@ -3934,7 +3832,7 @@ is the GNU Compiler Collection.")
(make-gcc-toolchain gcc-9))
(define-public gcc-toolchain-10
- (make-gcc-toolchain gcc-10))
+ gcc-toolchain)
(define-public gcc-toolchain-11
(make-gcc-toolchain gcc-11))