summary refs log tree commit diff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm51
1 files changed, 39 insertions, 12 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 9cabaa0886..ebf770bfa7 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -137,6 +137,28 @@
      (arguments
       `(#:guile ,%bootstrap-guile
         #:implicit-inputs? #f
+
+        #:modules ((guix build gnu-build-system)
+                   (guix build utils)
+                   (ice-9 ftw))                    ; for 'scandir'
+        #:phases (alist-cons-after
+                  'install 'add-symlinks
+                  (lambda* (#:key outputs #:allow-other-keys)
+                    ;; The cross-gcc invokes 'as', 'ld', etc, without the
+                    ;; triplet prefix, so add symlinks.
+                    (let ((out (assoc-ref outputs "out"))
+                          (triplet-prefix (string-append ,(boot-triplet) "-")))
+                      (define (has-triplet-prefix? name)
+                        (string-prefix? triplet-prefix name))
+                      (define (remove-triplet-prefix name)
+                        (substring name (string-length triplet-prefix)))
+                      (with-directory-excursion (string-append out "/bin")
+                        (for-each (lambda (name)
+                                    (symlink name (remove-triplet-prefix name)))
+                                  (scandir "." has-triplet-prefix?)))
+                      #t))
+                  %standard-phases)
+
         ,@(substitute-keyword-arguments (package-arguments binutils)
             ((#:configure-flags cf)
              `(cons ,(string-append "--target=" (boot-triplet))
@@ -145,7 +167,7 @@
 
 (define gcc-boot0
   (package-with-bootstrap-guile
-   (package (inherit gcc-4.8)
+   (package (inherit gcc-4.9)
      (name "gcc-cross-boot0")
      (arguments
       `(#:guile ,%bootstrap-guile
@@ -155,7 +177,7 @@
                    (ice-9 regex)
                    (srfi srfi-1)
                    (srfi srfi-26))
-        ,@(substitute-keyword-arguments (package-arguments gcc-4.8)
+        ,@(substitute-keyword-arguments (package-arguments gcc-4.9)
             ((#:configure-flags flags)
              `(append (list ,(string-append "--target=" (boot-triplet))
 
@@ -177,6 +199,8 @@
                             "--disable-libsanitizer"
                             "--disable-libitm"
                             "--disable-libgomp"
+                            "--disable-libcilkrts"
+                            "--disable-libvtv"
                             "--disable-libssp"
                             "--disable-libquadmath"
                             "--disable-decimal-float")
@@ -216,7 +240,7 @@
                     (with-directory-excursion
                         (string-append out "/lib/gcc/"
                                        ,(boot-triplet)
-                                       "/" ,(package-version gcc-4.8))
+                                       "/" ,(package-version gcc-4.9))
                       (symlink "libgcc.a" "libgcc_eh.a"))))
                 ,phases))))))
 
@@ -232,7 +256,7 @@
 
      ;; No need for Texinfo at this stage.
      (native-inputs (alist-delete "texinfo"
-                                  (package-native-inputs gcc-4.8))))))
+                                  (package-native-inputs gcc-4.9))))))
 
 (define perl-boot0
   (package-with-bootstrap-guile
@@ -270,10 +294,7 @@
   ;; 2nd stage inputs.
   `(("gcc" ,gcc-boot0)
     ("binutils-cross" ,binutils-boot0)
-
-    ;; Keep "binutils" here because the cross-gcc invokes `as', not the
-    ;; cross-`as'.
-    ,@%boot0-inputs))
+    ,@(alist-delete "binutils" %boot0-inputs)))
 
 (define glibc-final-with-bootstrap-bash
   ;; The final libc, "cross-built".  If everything went well, the resulting
@@ -331,7 +352,7 @@
 (define (cross-gcc-wrapper gcc binutils glibc bash)
   "Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
 that makes it available under the native tool names."
-  (package (inherit gcc-4.8)
+  (package (inherit gcc-4.9)
     (name (string-append (package-name gcc) "-wrapped"))
     (source #f)
     (build-system trivial-build-system)
@@ -499,7 +520,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
   ;; (remember that GCC-BOOT0 cannot build libstdc++.)
   ;; TODO: Write in terms of 'make-libstdc++'.
   (package-with-bootstrap-guile
-   (package (inherit gcc-4.8)
+   (package (inherit gcc-4.9)
      (name "libstdc++")
      (arguments
       `(#:guile ,%bootstrap-guile
@@ -518,7 +539,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
                                             (assoc-ref %outputs "out")
                                             "/include"
                                             ;; "/include/c++/"
-                                            ;; ,(package-version gcc-4.8)
+                                            ;; ,(package-version gcc-4.9)
                                             ))))
      (outputs '("out"))
      (inputs %boot2-inputs)
@@ -530,6 +551,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
   ;; The final GCC.
   (package (inherit gcc-boot0)
     (name "gcc")
+
+    ;; XXX: Currently #:allowed-references applies to all the outputs but the
+    ;; "debug" output contains disallowed references, notably
+    ;; linux-libre-headers.  Disable the debugging output to work around that.
+    (outputs (delete "debug" (package-outputs gcc-boot0)))
+
     (arguments
      `(#:guile ,%bootstrap-guile
        #:implicit-inputs? #f
@@ -546,7 +573,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
        ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
        ,@(substitute-keyword-arguments (package-arguments gcc-boot0)
            ((#:configure-flags boot-flags)
-            (let loop ((args (package-arguments gcc-4.8)))
+            (let loop ((args (package-arguments gcc-4.9)))
               (match args
                 ((#:configure-flags normal-flags _ ...)
                  normal-flags)