;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; 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 © 2015 Andreas Enge <andreas@enge.fr>
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
+ #:use-module (srfi srfi-1)
#:use-module (ice-9 regex))
(define %gcc-infrastructure
;; Base URL for GCC's infrastructure.
- "ftp://gcc.gnu.org/pub/gcc/infrastructure/")
+ "mirror://gcc/infrastructure/")
(define (gcc-configure-flags-for-triplet target)
"Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
("zlib" ,zlib)))
;; GCC < 5 is one of the few packages that doesn't ship .info files.
- (native-inputs `(("texinfo" ,texinfo)))
+ ;; Newer texinfos fail to build the manual, so we use an older one.
+ (native-inputs `(("texinfo" ,texinfo-5)))
(arguments
`(#:out-of-source? #t
(patches (search-patches "gcc-arm-link-spec-fix.patch"))))))
(define-public gcc-4.9
- (package (inherit gcc-4.8)
+ (package (inherit gcc-4.7)
(version "4.9.4")
(source (origin
(method url-fetch)
(sha256
(base32
"14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
- (patches (search-patches "gcc-libvtv-runpath.patch"))))))
+ (patches (search-patches "gcc-arm-bug-71399.patch"
+ "gcc-libvtv-runpath.patch"))))
+ (native-inputs `(("texinfo" ,texinfo)))))
(define-public gcc-5
;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
(sha256
(base32
"0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
- (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
+ (patches (search-patches "gcc-strmov-store-file-names.patch"
+ "gcc-5.0-libvtv-runpath.patch"))))))
(define-public gcc-6
(package
(inherit gcc-5)
- (version "6.2.0")
+ (version "6.3.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.bz2"))
(sha256
(base32
- "1idpf43988v1a6i8lw9ak1r7igcfg1bm5kn011iydlr2qygmhi4r"))
- (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
+ "17xjz30jb65hcf714vn9gcxvrrji8j20xm7n33qg1ywhyzryfsph"))
+ (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 accordingly.
%generic-search-paths))
(define-public gfortran
- (custom-gcc gcc "gfortran" '("fortran")
- %generic-search-paths))
+ ;; 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-4.9, and thus 'fold-packages' would
+ ;; report two gfortran@4.9 that are in fact identical.
+ gfortran-4.9)
(define-public gfortran-5
(custom-gcc gcc-5 "gfortran" '("fortran")
(define-public gcj
(package (inherit gcc)
(name "gcj")
+ (version (package-version gcc))
(inputs
`(("fastjar" ,fastjar)
("perl" ,perl)
,@(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)
,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 _
(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 _
name "-" version ".tar.gz")))
(sha256
(base32
- "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))))
+ "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))
+ (patches (search-patches "isl-0.11.1-aarch64-support.patch"))))
(build-system gnu-build-system)
(inputs `(("gmp" ,gmp)))
(home-page "http://isl.gforge.inria.fr/")
(define-public gnu-c-manual
(package
(name "gnu-c-manual")
- (version "0.2.4")
+ (version "0.2.5")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gnu-c-manual/gnu-c-manual-"
version ".tar.gz"))
(sha256
(base32
- "0cf4503shr7hxkbrjfi9dky6q2lqk95bgbgbjmvj2s2x312kakd9"))))
+ "1sfsj9256w18qzylgag2h5h377aq8in8929svblfnj9svfriqcys"))))
(build-system gnu-build-system)
(native-inputs `(("texinfo" ,texinfo)))
(arguments