diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2017-05-24 12:05:47 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2017-05-24 12:05:47 +0200 |
commit | d1a914082b7e53636f9801769ef96218b2125c4b (patch) | |
tree | 998805fc59fe0b1bb105b24a6a79fff646257d96 /gnu/packages/gcc.scm | |
parent | 657fb6c947d94cf946f29cd24e88bd080c01ff0a (diff) | |
parent | ae548434337cddf9677a4cd52b9370810b2cc9b6 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r-- | gnu/packages/gcc.scm | 157 |
1 files changed, 22 insertions, 135 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 0fdb5ca9b8..45b86fcc7e 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2014, 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com> @@ -399,6 +399,19 @@ Go. It also includes runtime support libraries for these languages.") "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph")) (patches (search-patches "gcc-strmov-store-file-names.patch" "gcc-5.0-libvtv-runpath.patch")))))) +(define-public gcc-7 + (package + (inherit gcc-6) + (version "7.1.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "05xwps0ci7wgxh50askpa2r9p8518qxdgh6ad7pnyk7n6p13d0ca")) + (patches (search-patches "gcc-strmov-store-file-names.patch" + "gcc-5.0-libvtv-runpath.patch")))))) ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions and the gfortran definition @@ -523,6 +536,14 @@ as the 'native-search-paths' field." (custom-gcc gcc-5 "gfortran" '("fortran") %generic-search-paths)) +(define-public gfortran-6 + (custom-gcc gcc-6 "gfortran" '("fortran") + %generic-search-paths)) + +(define-public gfortran-7 + (custom-gcc gcc-7 "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 @@ -538,140 +559,6 @@ as the 'native-search-paths' field." ;; a cyclic dependency. <http://debbugs.gnu.org/18101> #:separate-lib-output? #f)) -(define javac.in - (origin - (method url-fetch) - (uri (string-append "http://sources.gentoo.org/cgi-bin/viewvc.cgi/" - "gentoo-x86/dev-java/gcj-jdk/files/javac.in?revision=1.1")) - (file-name "javac.in") - (sha256 (base32 - "1c3dk4z5yfj6ic2fn3lyxs27n6pmn2wy9k0r1s17lnkf1bzkrciv")))) - -(define-public gcj - (package (inherit gcc) - (name "gcj") - (version (package-version gcc)) - (inputs - `(("fastjar" ,fastjar) - ("perl" ,perl) - ("javac.in" ,javac.in) - ("ecj-bootstrap" ,ecj-bootstrap) - ,@(package-inputs gcc))) - (native-inputs - `(("dejagnu" ,dejagnu) - ,@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) - `(("arm-patch" ,(origin - (method url-fetch) - (uri (search-patch "gcj-arm-mode.patch")) - (sha256 - (base32 - "1z15xs5yx6qinnb572swzxrn9f668sw7ga5280q3gznj1jyrynfn"))))) - '()) - ,@(package-native-inputs gcc))) - (native-search-paths %generic-search-paths) - - ;; Suppress the separate "lib" output, because otherwise the - ;; "lib" and "out" outputs would refer to each other, creating - ;; a cyclic dependency. <http://debbugs.gnu.org/18101> - (outputs - (delete "lib" (package-outputs gcc))) - (arguments - (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 regex) - (srfi srfi-1) - (srfi srfi-26)) - #:test-target "check-target-libjava" - ,@(package-arguments gcc)) - ((#:tests? _) #t) - ((#:configure-flags flags) - `(let ((ecj (assoc-ref %build-inputs "ecj-bootstrap"))) - `("--enable-java-home" - "--enable-gjdoc" - ,(string-append "--with-ecj-jar=" ecj) - "--enable-languages=java" - ,@(remove (cut string-match "--enable-languages.*" <>) - ,flags)))) - ((#:phases phases) - `(modify-phases ,phases - ;; Conditionally add phase to apply patch - ,@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) - `((add-after 'unpack 'apply-arm-patch - (lambda* (#:key inputs #:allow-other-keys) - (zero? (system* "patch" "-p1" - "-i" (assoc-ref inputs "arm-patch")))))) - '()) - (add-after - 'unpack 'add-lib-output-to-rpath - (lambda _ - (substitute* "libjava/Makefile.in" - (("libgcj_bc_dummy_LINK = .* -shared" line) - (string-append line " -Wl,-rpath=$(libdir)")) - (("libgcj(_bc)?_la_LDFLAGS =" ldflags _) - (string-append ldflags " -Wl,-rpath=$(libdir)"))))) - (add-after - 'unpack 'patch-testsuite - ;; dejagnu-1.6 removes the 'absolute' command - (lambda _ - ;; This test fails on armhf. It seems harmless enough to disable it. - (for-each delete-file '("libjava/testsuite/libjava.lang/Throw_2.java" - "libjava/testsuite/libjava.lang/Throw_2.out" - "libjava/testsuite/libjava.lang/Throw_2.jar")) - (substitute* "libjava/testsuite/lib/libjava.exp" - (("absolute") "file normalize")) - #t)) - (add-after - 'install 'install-javac-and-javap-wrappers - (lambda _ - (let* ((javac (assoc-ref %build-inputs "javac.in")) - (ecj (assoc-ref %build-inputs "ecj-bootstrap")) - (gcj (assoc-ref %outputs "out")) - (gcjbin (string-append gcj "/bin/")) - (jvm (string-append gcj "/lib/jvm/")) - (target (string-append jvm "/bin/javac"))) - - (symlink (string-append gcjbin "jcf-dump") - (string-append jvm "/bin/javap")) - - (copy-file ecj (string-append gcj "/share/java/ecj.jar")) - - ;; Create javac wrapper from the template javac.in by - ;; replacing the @VARIABLES@ with paths. - (copy-file javac target) - (patch-shebang target) - (substitute* target - (("@JAVA@") - (string-append jvm "/bin/java")) - (("@ECJ_JAR@") - (string-append gcj "/share/java/ecj.jar")) - (("@RT_JAR@") - (string-append jvm "/jre/lib/rt.jar")) - (("@TOOLS_JAR@") - (string-append jvm "/lib/tools.jar"))) - (chmod target #o755) - #t))) - (add-after - 'install 'remove-broken-or-conflicting-files - (lambda _ - (let ((out (assoc-ref %outputs "out"))) - (for-each - delete-file - (append (find-files (string-append out "/lib/jvm/jre/lib") - "libjawt.so") - (find-files (string-append out "/bin") - ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) - #t)))))))) - -(define ecj-bootstrap - (origin - (method url-fetch) - (uri "ftp://sourceware.org/pub/java/ecj-4.9.jar") - (sha256 - (base32 - "1k9lgm3qamf6zy534pa2zwskr8mpiqrngbv1vw9j4y1ghrdyf1lm")))) - (define-public gcc-objc-4.8 (custom-gcc gcc-4.8 "gcc-objc" '("objc") (list (search-path-specification |