Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / commencement.scm
index 14ecf24..ced13eb 100644 (file)
@@ -24,8 +24,6 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages commencement)
-  #:use-module ((guix licenses)
-                #:select (gpl3+ lgpl2.0+ public-domain))
   #:use-module (gnu packages)
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages base)
   #:use-module (guix memoization)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
-  #:use-module (srfi srfi-26)
   #:use-module (ice-9 vlist)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex)
   #:export (make-gcc-toolchain))
 
 ;;; Commentary:
@@ -1412,6 +1408,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
@@ -1452,7 +1453,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
@@ -1718,20 +1727,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
@@ -1739,17 +1741,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".)
@@ -1760,19 +1751,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
@@ -1895,16 +1883,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.
@@ -2400,9 +2396,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)
@@ -2562,8 +2555,8 @@ COREUTILS-FINAL vs. COREUTILS, etc."
       (synopsis "Complete GCC tool chain for C/C++ development")
       (description
        "This package provides a complete GCC tool chain for C/C++ development to
-be   installed in user profiles.  This includes GCC, as well as libc (headers
-an  d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+be installed in user profiles.  This includes GCC, as well as libc (headers and
+binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
       (home-page "https://gcc.gnu.org/")
       (outputs '("out" "debug" "static"))