gnu: Add blktrace.
[jackhill/guix/guix.git] / gnu / packages / gcc.scm
index c8e993c..589e936 100644 (file)
@@ -3,10 +3,11 @@
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -509,28 +510,28 @@ It also includes runtime support libraries for these languages.")))
 (define-public gcc-8
   (package
     (inherit gcc-7)
-    (version "8.3.0")
+    (version "8.4.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/gcc/gcc-"
                                   version "/gcc-" version ".tar.xz"))
               (sha256
                (base32
-                "0b3xv411xhlnjmin2979nxcbnidgvzqdf4nbhix99x60dkzavfk4"))
+                "1m1d3gfix56w4aq8myazzfffkl8bqcrx4jhhapnjf7qfs596w2p3"))
               (patches (search-patches "gcc-8-strmov-store-file-names.patch"
                                        "gcc-5.0-libvtv-runpath.patch"))))))
 
 (define-public gcc-9
   (package
    (inherit gcc-8)
-   (version "9.1.0")
+   (version "9.3.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/gcc/gcc-"
                                 version "/gcc-" version ".tar.xz"))
             (sha256
              (base32
-              "1817nc2bqdc251k0lpc51cimna7v68xjrnvqzvc50q3ax4s6i9kr"))
+              "1la2yy27ziasyf0jvzk58y1i5b5bq2h176qil550bxhifs39gqbi"))
             (patches (search-patches "gcc-9-strmov-store-file-names.patch"
                                      "gcc-9-asan-fix-limits-include.patch"
                                      "gcc-5.0-libvtv-runpath.patch"))))))
@@ -538,7 +539,7 @@ It also includes runtime support libraries for these languages.")))
 ;; Note: When changing the default gcc version, update
 ;;       the gcc-toolchain-* definitions and the gfortran definition
 ;;       accordingly.
-(define-public gcc gcc-5)
+(define-public gcc gcc-7)
 
 (define-public (make-libstdc++ gcc)
   "Return a libstdc++ package based on GCC.  The primary use case is when
@@ -597,6 +598,7 @@ using compilers other than GCC."
     (outputs '("out"))
     (native-inputs '())
     (propagated-inputs '())
+    (properties '())
     (synopsis "Collection of subroutines used by various GNU programs")))
 
 (define-public libiberty
@@ -649,35 +651,74 @@ as the 'native-search-paths' field."
          (files '("lib" "lib64")))))
 
 (define-public gfortran-4.8
-  (custom-gcc gcc-4.8 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-4.8 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran-4.9
-  (custom-gcc gcc-4.9 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-4.9 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran-5
-  (custom-gcc gcc-5 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-5 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran-6
-  (custom-gcc gcc-6 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-6 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran-7
-  (custom-gcc gcc-7 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-7 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran-8
-  (custom-gcc gcc-8 "gfortran" '("fortran")
-              %generic-search-paths))
+  (hidden-package
+   (custom-gcc gcc-8 "gfortran" '("fortran")
+               %generic-search-paths)))
+
+(define-public gfortran-9
+  (hidden-package
+   (custom-gcc gcc-9 "gfortran" '("fortran")
+               %generic-search-paths)))
 
 (define-public gfortran
   ;; Note: Update this when GCC changes!  We cannot use
   ;; (custom-gcc gcc "fortran" …) because that would lead to a package object
   ;; that is not 'eq?' with GFORTRAN-5, and thus 'fold-packages' would
   ;; report two gfortran@5 that are in fact identical.
-  gfortran-5)
+  gfortran-7)
+
+(define-public libgccjit
+  (package
+    (inherit gcc-9)
+    (name "libgccjit")
+    (outputs (delete "lib" (package-outputs gcc)))
+    (properties (alist-delete 'hidden? (package-properties gcc)))
+    (arguments
+     (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
+                                                (guix build utils)
+                                                (ice-9 regex)
+                                                (srfi srfi-1)
+                                                (srfi srfi-26))
+                                     ,@(package-arguments gcc))
+       ((#:configure-flags flags)
+        `(append `("--enable-host-shared"
+                   ,(string-append "--enable-languages=jit"))
+                 (remove (cut string-match "--enable-languages.*" <>)
+                         ,flags)))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'install 'remove-broken-or-conflicting-files
+             (lambda* (#:key outputs #:allow-other-keys)
+               (for-each delete-file
+                         (find-files (string-append (assoc-ref outputs "out") "/bin")
+                                     ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)"))
+               #t))))))))
+
 
 (define-public gccgo-4.9
   (custom-gcc gcc-4.9 "gccgo" '("go")
@@ -741,7 +782,7 @@ as the 'native-search-paths' field."
                      (variable "LIBRARY_PATH")
                      (files '("lib" "lib64"))))))
 
-(define-public gcc-objc gcc-objc-5)
+(define-public gcc-objc gcc-objc-7)
 
 (define-public gcc-objc++-4.8
   (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")
@@ -797,7 +838,7 @@ as the 'native-search-paths' field."
                      (variable "LIBRARY_PATH")
                      (files '("lib" "lib64"))))))
 
-(define-public gcc-objc++ gcc-objc++-5)
+(define-public gcc-objc++ gcc-objc++-7)
 
 (define (make-libstdc++-doc gcc)
   "Return a package with the libstdc++ documentation for GCC."
@@ -860,7 +901,7 @@ as the 'native-search-paths' field."
 (define-public isl
   (package
     (name "isl")
-    (version "0.19")
+    (version "0.21")
     (source (origin
              (method url-fetch)
              (uri (list (string-append
@@ -868,10 +909,10 @@ as the 'native-search-paths' field."
                          version
                          ".tar.bz2")
                         (string-append %gcc-infrastructure
-                                       name "-" version ".tar.gz")))
+                                       name "-" version ".tar.bz2")))
              (sha256
               (base32
-               "1n4yz9rj24mv226hqbpw210ifvqkn8dgvpnkzf0s0lkq9zrjd5ym"))))
+               "0ng8l3q1px9lkzb44nxnzhh6fhdbclrwng9xs2v9m8yii8gs336i"))))
     (build-system gnu-build-system)
     (inputs `(("gmp" ,gmp)))
     (home-page "http://isl.gforge.inria.fr/")
@@ -898,7 +939,7 @@ dependence analysis and bounds on piecewise step-polynomials.")
               (uri (list (string-append "http://isl.gforge.inria.fr/isl-"
                                         version ".tar.bz2")
                          (string-append %gcc-infrastructure
-                                        "isl-" version ".tar.gz")))
+                                        "isl-" version ".tar.bz2")))
               (sha256
                (base32
                 "06ybml6llhi4i56q90jnimbcgk1lpcdwhy9nxdxra2hxz3bhz2vb"))))))
@@ -915,7 +956,7 @@ dependence analysis and bounds on piecewise step-polynomials.")
                          version
                          ".tar.bz2")
                         (string-append %gcc-infrastructure
-                                       name "-" version ".tar.gz")))
+                                       name "-" version ".tar.bz2")))
              (sha256
               (base32
                "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))