;;; 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 © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;;
;;; This file is part of GNU Guix.
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.bz2"))
+ (patches (search-patches "gcc-4-compile-with-gcc-5.patch"))
(sha256
(base32
"10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
(inputs `(("gmp" ,gmp)
("mpfr" ,mpfr)
("mpc" ,mpc)
- ("isl" ,isl)
- ("cloog" ,cloog)
("libelf" ,libelf)
("zlib" ,zlib)))
;; Fix the dynamic linker's file name.
(substitute* (find-files "gcc/config"
"^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
- (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ ]*).*$"
+ (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ \t]*).*$"
_ gnu-user suffix)
(format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
gnu-user suffix
for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and
Go. It also includes runtime support libraries for these languages.")
(license gpl3+)
+ (supported-systems (delete "aarch64-linux" %supported-systems))
(home-page "https://gcc.gnu.org/"))))
(define-public gcc-4.8
(sha256
(base32
"08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
- (patches (search-patches "gcc-arm-link-spec-fix.patch"))))))
+ (patches (search-patches "gcc-arm-link-spec-fix.patch"))))
+ (supported-systems %supported-systems)
+ (inputs
+ `(("isl" ,isl-0.11)
+ ("cloog" ,cloog)
+ ,@(package-inputs gcc-4.7)))))
(define-public gcc-4.9
- (package (inherit gcc-4.7)
+ (package (inherit gcc-4.8)
(version "4.9.4")
(source (origin
(method url-fetch)
"0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
(patches (search-patches "gcc-arm-bug-71399.patch"
"gcc-strmov-store-file-names.patch"
+ "gcc-asan-powerpc-missing-include.patch"
"gcc-5.0-libvtv-runpath.patch"
"gcc-5-source-date-epoch-1.patch"
"gcc-5-source-date-epoch-2.patch"))))))
+ ;; TODO: gcc-5 doesn't need cloog.
+ ;;(inputs
+ ;; `(("isl" ,isl)
+ ;; ,@(package-inputs gcc-4.7)))))
(define-public gcc-6
(package
(inherit gcc-5)
- (version "6.3.0")
+ (version "6.4.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
- version "/gcc-" version ".tar.bz2"))
+ version "/gcc-" version ".tar.xz"))
(sha256
(base32
- "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph"))
+ "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5"))
(patches (search-patches "gcc-strmov-store-file-names.patch"
- "gcc-5.0-libvtv-runpath.patch"))))))
+ "gcc-6-source-date-epoch-1.patch"
+ "gcc-6-source-date-epoch-2.patch"
+ "gcc-5.0-libvtv-runpath.patch"))))
+ (inputs
+ `(("isl" ,isl)
+ ,@(package-inputs gcc-4.7)))))
+
+(define-public gcc-7
+ (package
+ (inherit gcc-6)
+ (version "7.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-"
+ version "/gcc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "16j7i0888j2f1yp9l0nhji6cq65dy6y4nwy8868a8njbzzwavxqw"))
+ (patches (search-patches "gcc-strmov-store-file-names.patch"
+ "gcc-5.0-libvtv-runpath.patch"))))
+ (description
+ "GCC is the GNU Compiler Collection. It provides compiler front-ends
+for several languages, including C, C++, Objective-C, Fortran, Ada, and Go.
+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
(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
;; 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
(variable "LIBRARY_PATH")
(files '("lib" "lib64"))))))
-(define-public gcc-objc gcc-objc-4.9)
+(define-public gcc-objc-5
+ (custom-gcc gcc-5 "gcc-objc" '("objc")
+ (list (search-path-specification
+ (variable "OBJC_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc-6
+ (custom-gcc gcc-6 "gcc-objc" '("objc")
+ (list (search-path-specification
+ (variable "OBJC_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc-7
+ (custom-gcc gcc-7 "gcc-objc" '("objc")
+ (list (search-path-specification
+ (variable "OBJC_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc gcc-objc-5)
(define-public gcc-objc++-4.8
(custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")
(variable "LIBRARY_PATH")
(files '("lib" "lib64"))))))
-(define-public gcc-objc++ gcc-objc++-4.9)
+(define-public gcc-objc++-5
+ (custom-gcc gcc-5 "gcc-objc++" '("obj-c++")
+ (list (search-path-specification
+ (variable "OBJCPLUS_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc++-6
+ (custom-gcc gcc-6 "gcc-objc++" '("obj-c++")
+ (list (search-path-specification
+ (variable "OBJCPLUS_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc++-7
+ (custom-gcc gcc-7 "gcc-objc++" '("obj-c++")
+ (list (search-path-specification
+ (variable "OBJCPLUS_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib" "lib64"))))))
+
+(define-public gcc-objc++ gcc-objc++-5)
(define (make-libstdc++-doc gcc)
"Return a package with the libstdc++ documentation for GCC."
(define-public isl
(package
(name "isl")
- (version "0.11.1")
+ (version "0.18")
(source (origin
(method url-fetch)
(uri (list (string-append
name "-" version ".tar.gz")))
(sha256
(base32
- "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))
- (patches (search-patches "isl-0.11.1-aarch64-support.patch"))))
+ "06ybml6llhi4i56q90jnimbcgk1lpcdwhy9nxdxra2hxz3bhz2vb"))))
(build-system gnu-build-system)
(inputs `(("gmp" ,gmp)))
(home-page "http://isl.gforge.inria.fr/")
dependence analysis and bounds on piecewise step-polynomials.")
(license lgpl2.1+)))
+(define-public isl-0.11
+ (package
+ (inherit isl)
+ (name "isl")
+ (version "0.11.1")
+ (source (origin
+ (method url-fetch)
+ (uri (list (string-append
+ "http://isl.gforge.inria.fr/isl-"
+ version
+ ".tar.bz2")
+ (string-append %gcc-infrastructure
+ name "-" version ".tar.gz")))
+ (sha256
+ (base32
+ "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))
+ (patches (search-patches "isl-0.11.1-aarch64-support.patch"))))))
+
(define-public cloog
(package
(name "cloog")
(file-name (string-append name "-" version ".tar.gz"))))
(build-system gnu-build-system)
(inputs `(("gmp" ,gmp)
- ("isl" ,isl)))
+ ("isl" ,isl-0.11)))
(arguments '(#:configure-flags '("--with-isl=system")))
(home-page "http://www.cloog.org/")
(synopsis "Library to generate code for scanning Z-polyhedra")