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.scm276
1 files changed, 79 insertions, 197 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 42d1132fba..2a0a83ad49 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 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>
@@ -144,11 +144,6 @@
(lambda _
(invoke "sh" "install.sh"))))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
(files '("share/mes/include")))
@@ -262,11 +257,6 @@
(lambda _
(invoke "sh" "install.sh"))))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
(files '("include")))
@@ -623,18 +613,14 @@ ac_cv_c_float_format='IEEE (little-endian)'
(string-append tcc-lib "/libc+gnu.o")
(string-append tcc-lib "/libtcc1.o"))
(invoke "ls" "-ltrF" gcc-dir)
- (copy-recursively (string-append tcc "/include")
- (string-append out "/include"))
#t))))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
- (files '("include" "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
+ (files '("include"
+
+ ;; Needed to get things like GCC's <stddef.h>.
+ "lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib")))))))
@@ -665,16 +651,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(mkdir-p include)
(copy-recursively "include" out)
(copy-recursively headers out)
- #t))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))))))
+ #t))))))))
(define glibc-mesboot0
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
@@ -756,67 +733,37 @@ ac_cv_c_float_format='IEEE (little-endian)'
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
"running ./configure ~a\n" (string-join configure-flags))
- (apply invoke "./configure" configure-flags))))))
- (native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib")))))))
+ (apply invoke "./configure" configure-flags))))))))
(define gcc-mesboot0
(package
(inherit gcc-core-mesboot)
(name "gcc-mesboot0")
(native-inputs `(("binutils" ,binutils-mesboot0)
- ("gcc" ,gcc-core-mesboot)
+
+ ;; Packages are given in an order that's relevant for
+ ;; #include_next purposes.
("libc" ,glibc-mesboot0)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("gcc" ,gcc-core-mesboot)
("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
("make" ,make-mesboot0)))
(arguments
(substitute-keyword-arguments (package-arguments gcc-core-mesboot)
((#:phases phases)
`(modify-phases ,phases
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"))
- (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- ;; FIXME: add glibc dirs to paths manually
- (setenv "LIBRARY_PATH" (string-join
- (list (string-append glibc "/lib")
- (getenv "LIBRARY_PATH"))
- ":"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- (with-output-to-file "config.cache"
- (lambda _
- (display "
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
ac_cv_c_float_format='IEEE (little-endian)'
")))
- #t)))
+ #t))
(replace 'install2
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -934,7 +881,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(package
(inherit gcc-mesboot0)
(name "gcc-mesboot1")
- (version "4.7.4")
+ (version (package-version gcc-4.7))
(source (bootstrap-origin
(origin (inherit (package-source gcc-4.7))
(patches (search-patches "gcc-boot-4.7.4.patch")))))
@@ -942,13 +889,14 @@ ac_cv_c_float_format='IEEE (little-endian)'
("mpfr-source" ,(package-source mpfr-boot))
("mpc-source" ,(package-source mpc-boot))))
(native-inputs `(("binutils" ,binutils-mesboot)
- ("gcc" ,gcc-mesboot0)
+
("libc" ,glibc-mesboot0)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("gcc" ,gcc-mesboot0)
("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
("make" ,make-mesboot)))
(arguments
(substitute-keyword-arguments (package-arguments gcc-core-mesboot)
@@ -990,24 +938,18 @@ ac_cv_c_float_format='IEEE (little-endian)'
#t)))
(delete 'remove-info)
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (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)))
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+
+ ;; Allow MPFR headers to be found.
+ (setenv "C_INCLUDE_PATH"
+ (string-append (getcwd) "/mpfr/src:"
+ (getenv "C_INCLUDE_PATH")))
+
+ ;; 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))
(delete 'install2)))
((#:configure-flags configure-flags)
`(let ((out (assoc-ref %outputs "out"))
@@ -1154,22 +1096,18 @@ exec " gcc "/bin/" program
((#:phases phases)
`(modify-phases ,phases
(replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (headers (assoc-ref %build-inputs "headers"))
- (bash (assoc-ref %build-inputs "bash"))
- (coreutils (assoc-ref %build-inputs "coreutils"))
- (libc (assoc-ref %build-inputs "libc"))
- (gcc (assoc-ref %build-inputs "gcc"))
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((headers (assoc-ref inputs "headers"))
+ (libc (assoc-ref inputs "libc"))
+ (gcc (assoc-ref inputs "gcc"))
(cppflags (string-append
" -I " (getcwd) "/nptl/sysdeps/pthread/bits"
" -D BOOTSTRAP_GLIBC=1"))
(cflags (string-append " -L " (getcwd)
" -L " libc "/lib")))
(setenv "libc_cv_friendly_stddef" "yes")
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "SHELL" (getenv "CONFIG_SHELL"))
- (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv "CONFIG_SHELL"))
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "SHELL" (which "sh"))
(setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
(setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
@@ -1177,10 +1115,7 @@ exec " gcc "/bin/" program
;; avoid -fstack-protector
(setenv "libc_cv_ssp" "false")
(substitute* "configure"
- (("/bin/pwd") (string-append coreutils "/bin/pwd")))
- (setenv "C_INCLUDE_PATH" (string-append libc "/include"
- headers "/include"))
- (setenv "LIBRARY_PATH" (string-append libc "/lib"))
+ (("/bin/pwd") "pwd"))
#t)))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
@@ -1240,38 +1175,24 @@ exec " gcc "/bin/" program
(install-flags (cons "install" make-flags)))
(apply invoke "make" install-flags)
(copy-recursively kernel-headers out)
- #t))))))))
- (native-search-paths ;; FIXME: move to glibc-mesboot0
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
- (list (search-path-specification
- (variable "C_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "CPLUS_INCLUDE_PATH")
- (files '("include")))
- (search-path-specification
- (variable "LIBRARY_PATH")
- (files '("lib")))))))
+ #t))))))))))
(define gcc-mesboot
(package
(inherit gcc-mesboot1)
(name "gcc-mesboot")
- (version "4.9.4")
+ (version (package-version gcc-4.9))
(source (bootstrap-origin (package-source gcc-4.9)))
(native-inputs `(("binutils" ,binutils-mesboot)
+
+ ("libc" ,glibc-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
("gcc-wrapper" ,gcc-mesboot1-wrapper)
("gcc" ,gcc-mesboot1)
- ("libc" ,glibc-mesboot)
("bash" ,%bootstrap-coreutils&co)
("coreutils" ,%bootstrap-coreutils&co)
("diffutils" ,diffutils-mesboot)
- ("kernel-headers" ,%bootstrap-linux-libre-headers)
("make" ,make-mesboot)))
(arguments
`(#:validate-runpath? #f
@@ -1314,34 +1235,7 @@ exec " gcc "/bin/" program
"--disable-libstdcxx-pch"
;; for libcpp ...
- "--disable-build-with-cxx")))
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (binutils (assoc-ref %build-inputs "binutils"))
- (bash (assoc-ref %build-inputs "bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (glibc (assoc-ref %build-inputs "libc"))
- (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
- (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
- (setenv "C_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (setenv "CPLUS_INCLUDE_PATH" (string-append
- gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
- ":" kernel-headers "/include"
- ":" glibc "/include"
- ":" (getcwd) "/mpfr/src"))
- (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) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
- (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
- #t))))))))))
+ "--disable-build-with-cxx"))))))))
(define gcc-mesboot-wrapper
;; We need this so gcc-mesboot can be used to create shared binaries that
@@ -1408,6 +1302,11 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
#:tests? #f ; cannot run "make check"
,@(substitute-keyword-arguments (package-arguments gnu-make)
+ ((#:configure-flags flags ''())
+ ;; The generated config.status has some problems due to the
+ ;; bootstrap environment. Disable dependency tracking to work
+ ;; around it.
+ `(cons "--disable-dependency-tracking" ,flags))
((#:phases phases)
`(modify-phases ,phases
(replace 'build
@@ -1448,7 +1347,15 @@ exec " gcc "/bin/" program
(arguments
`(#:implicit-inputs? #f
#:guile ,%bootstrap-guile
- ,@(package-arguments findutils)))))
+
+ ;; The build system assumes we have done a mistake when time_t is 32-bit
+ ;; on a 64-bit system. Ignore that for our bootstrap toolchain.
+ ,@(if (target-64bit?)
+ (substitute-keyword-arguments (package-arguments findutils)
+ ((#:configure-flags flags ''())
+ `(cons "TIME_T_32_BIT_OK=yes"
+ ,flags)))
+ (package-arguments findutils))))))
(define file-boot0
(package
@@ -1714,20 +1621,13 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
,@(package-arguments m4)))))
-(define m4-boot0*
- (package
- ;; TODO: On the next rebuild cycle, use M4-BOOT0 as is.
- (inherit m4-boot0)
- (name "m4")))
-
(define bison-boot0
;; This Bison is needed to build MiG so we need it early in the process.
;; Recent versions of Linux-Libre headers also depend on this.
(package
(inherit bison)
- ;; TODO: On the next build cycle, do:
- ;;(name "bison-boot0")
- (propagated-inputs `(("m4" ,m4-boot0*)))
+ (name "bison-boot0")
+ (propagated-inputs `(("m4" ,m4-boot0)))
(native-inputs `(("perl" ,perl-boot0)))
(inputs (%boot0-inputs)) ;remove Flex...
(arguments
@@ -1735,17 +1635,6 @@ exec " gcc "/bin/" program
#:implicit-inputs? #f
#:guile ,%bootstrap-guile
- ;; XXX: These flags should be unconditional, but for now
- ;; we just add them on x86 to avoid a full rebuild.
- ;; TODO: On the next core-updates, use
- ;; 'substitute-keyword-arguments' to inherit them from
- ;; BISON.
- ,@(if (member (%current-system)
- '("x86_64-linux" "i686-linux"))
- '(#:parallel-build? #f
- #:parallel-tests? #f)
- '())
-
;; Zero timestamps in liby.a; this must be done
;; explicitly here because the bootstrap Binutils don't
;; do that (default is "cru".)
@@ -1756,19 +1645,16 @@ exec " gcc "/bin/" program
"RANLIB=ranlib")
(_
"RANLIB=ranlib -D"))
- "V=1")))))
+ "V=1")
+
+ ,@(package-arguments bison)))))
(define flex-boot0
;; This Flex is needed to build MiG as well as Linux-Libre headers.
(package
(inherit flex)
(native-inputs `(("bison" ,bison-boot0)))
- (propagated-inputs
- ;; XXX: Here we use an 'm4-boot0' package that's not eq? so that it
- ;; appears twice in '%build-inputs', like when we were using
- ;; 'package-with-explicit-inputs'.
- ;; TODO: Remove this hack on the next rebuild cycle.
- `(("m4" ,(package (inherit m4-boot0*)))))
+ (propagated-inputs `(("m4" ,m4-boot0)))
(inputs (%boot0-inputs))
(arguments
`(#:implicit-inputs? #f
@@ -1891,16 +1777,24 @@ the bootstrap environment."
;; pthreads, which is missing on non-x86 platforms at this stage.
;; Python 3.6 technically supports being built without threading
;; support, but requires additional patches.
- (version "3.5.7")
+ (version "3.5.9")
(source (bootstrap-origin
(origin
- (inherit (package-source python))
+ (method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
- (patches '())
(sha256
(base32
- "1p67pnp2ca5przx2s45r8m55dcn6f5hsm0l4s1zp7mglkf4r4n18")))))
+ "0jdh9pvx6m6lfz2liwvvhn7vks7qrysqgwn517fkpxb77b33fjn2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete the bundled copy of libexpat.
+ (delete-file-recursively "Modules/expat")
+ (substitute* "Modules/Setup.dist"
+ ;; Link Expat instead of embedding the bundled one.
+ (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
+ #t)))))
(inputs
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
@@ -2299,15 +2193,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
char-set:letter)
,(package-name lib)))
(list gmp-6.0 mpfr mpc))
- #t)))
- (add-before 'configure 'treat-glibc-as-system-header
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((libc (assoc-ref inputs "libc")))
- ;; Make sure Glibc is treated as a "system header" so
- ;; #include_next does the right thing.
- (for-each (lambda (var)
- (setenv var (string-append libc "/include")))
- '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
#t))))))))
;; This time we want Texinfo, so we get the manual. Add
@@ -2396,9 +2281,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define gnu-make-final
;; The final GNU Make, which uses the final Guile.
- ;; FIXME: This is a mistake: we shouldn't be propagating GUILE-FINAL to
- ;; PKG-CONFIG.
- ;; TODO: Fix that on the next rebuild cycle.
(let ((pkg-config (package
(inherit %pkg-config) ;the native pkg-config
(inputs `(("guile" ,guile-final)