1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
8 ;;; This file is part of GNU Guix.
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 (define-module (gnu packages gcc)
24 #:use-module ((guix licenses)
25 #:select (gpl3+ gpl2+ lgpl2.1+ lgpl2.0+ fdl1.3+))
26 #:use-module (gnu packages)
27 #:use-module (gnu packages bootstrap)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages multiprecision)
30 #:use-module (gnu packages texinfo)
31 #:use-module (gnu packages dejagnu)
32 #:use-module (gnu packages documentation)
33 #:use-module (gnu packages xml)
34 #:use-module (gnu packages docbook)
35 #:use-module (gnu packages graphviz)
36 #:use-module (gnu packages elf)
37 #:use-module (gnu packages perl)
38 #:use-module (guix packages)
39 #:use-module (guix download)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system trivial)
42 #:use-module (guix utils)
43 #:use-module (srfi srfi-1)
44 #:use-module (ice-9 regex))
46 (define %gcc-infrastructure
47 ;; Base URL for GCC's infrastructure.
48 "ftp://gcc.gnu.org/pub/gcc/infrastructure/")
50 (define (gcc-configure-flags-for-triplet target)
51 "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
53 The purpose of this procedure is to translate extended GNU triplets---e.g.,
54 where the OS part is overloaded to denote a specific ABI---into GCC
55 `configure' options. We take extended GNU triplets that glibc recognizes."
56 (cond ((string-match "^mips64el.*gnuabin?64$" target)
57 ;; Triplets recognized by glibc as denoting the N64 ABI; see
58 ;; ports/sysdeps/mips/preconfigure.
61 ((string-match "^arm.*-gnueabihf$" target)
62 '("--with-arch=armv7-a"
68 ;; TODO: Add `arm.*-gnueabi', etc.
71 (define-public gcc-4.7
72 (let* ((stripped? #t) ;whether to strip the compiler, not the libraries
75 ;; Return the `_FOR_TARGET' variables that are needed when
76 ;; cross-compiling GCC.
77 (let ((target (%current-target-system)))
79 (map (lambda (var tool)
80 (string-append (string-append var "_FOR_TARGET")
82 '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
83 '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
86 (let ((base '(or (assoc-ref outputs "lib")
87 (assoc-ref outputs "out"))))
89 ;; Return the directory that contains lib/libgcc_s.so et al.
90 (if (%current-target-system)
91 `(string-append ,base "/" ,(%current-target-system))
95 ;; This is terrible. Since we have two levels of quasiquotation,
96 ;; we have to do this convoluted thing just so we can insert the
97 ;; contents of (maybe-target-tools).
101 "--enable-languages=c,c++"
105 ;; No pre-compiled libstdc++ headers, to save space.
106 "--disable-libstdcxx-pch"
108 "--with-local-prefix=/no-gcc-local-prefix"
110 ;; With a separate "lib" output, the build system
111 ;; incorrectly guesses GPLUSPLUS_INCLUDE_DIR, so force
112 ;; it. (Don't use a versioned sub-directory, that's
114 ,(string-append "--with-gxx-include-dir="
115 (assoc-ref %outputs "out")
118 ,(let ((libc (assoc-ref %build-inputs "libc")))
120 (string-append "--with-native-system-header-dir=" libc
122 "--without-headers")))
124 ;; Pass the right options for the target triplet.
126 (or (%current-target-system)
127 (nix-system->gnu-triplet (%current-system)))))
128 (gcc-configure-flags-for-triplet triplet))
130 (maybe-target-tools))))))
136 (uri (string-append "mirror://gnu/gcc/gcc-"
137 version "/gcc-" version ".tar.bz2"))
140 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
141 (build-system gnu-build-system)
143 ;; Separate out the run-time support libraries because all the
144 ;; dynamic-linked objects depend on it.
145 (outputs '("out" ;commands, etc. (60+ MiB)
146 "lib" ;libgcc_s, libgomp, etc. (15+ MiB)
147 "debug")) ;debug symbols of run-time libraries
149 (inputs `(("gmp" ,gmp)
157 ;; GCC < 5 is one of the few packages that doesn't ship .info files.
158 (native-inputs `(("texinfo" ,texinfo)))
161 `(#:out-of-source? #t
162 #:configure-flags ,(configure-flags)
164 ;; None of the flags below are needed when doing a Canadian cross.
165 ;; TODO: Simplify this.
166 ,(if (%current-target-system)
170 `(let* ((libc (assoc-ref %build-inputs "libc"))
171 (libc-native (or (assoc-ref %build-inputs "libc-native")
174 (list (string-append "LDFLAGS_FOR_TARGET="
176 "-Wl,-dynamic-linker "
178 ,(glibc-dynamic-linker)))
181 ;; Native programs like 'genhooks' also need that right.
182 ,(string-append "LDFLAGS="
183 "-Wl,-rpath=" libc-native "/lib "
184 "-Wl,-dynamic-linker "
185 "-Wl," libc-native ,(glibc-dynamic-linker))
186 ,(string-append "BOOT_CFLAGS=-O2 "
187 ,(if stripped? "-g0" "-g")))))
193 'configure 'pre-configure
194 (lambda* (#:key inputs outputs #:allow-other-keys)
195 (let ((libdir ,(libdir))
196 (libc (assoc-ref inputs "libc")))
198 ;; The following is not performed for `--without-headers'
199 ;; cross-compiler builds.
201 ;; Join multi-line definitions of GLIBC_DYNAMIC_LINKER* into a
202 ;; single line, to allow the next step to work properly.
205 (substitute* (find-files "gcc/config"
206 "^linux(64|-elf|-eabi)?\\.h$")
207 (("(#define GLIBC_DYNAMIC_LINKER.*)\\\\\n$" _ line)
211 ;; Fix the dynamic linker's file name.
212 (substitute* (find-files "gcc/config"
213 "^(linux|gnu)(64|-elf|-eabi)?\\.h$")
214 (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
215 (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
217 (string-append libc ,(glibc-dynamic-linker)))))
219 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
220 ;; `crt{begin,end}.o', which come with GCC.
221 (substitute* (find-files "gcc/config"
223 (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix)
224 ;; Help libgcc_s.so be found (see also below.) Always use
225 ;; '-lgcc_s' so that libgcc_s.so is always found by those
226 ;; programs that use 'pthread_cancel' (glibc dlopens
227 ;; libgcc_s.so when pthread_cancel support is needed, but
228 ;; having it in the application's RUNPATH isn't enough; see
229 ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
231 ;; NOTE: The '-lgcc_s' added below needs to be removed in a
232 ;; later phase of %gcc-static. If you change the string
233 ;; below, make sure to update the relevant code in
234 ;; %gcc-static package as needed.
235 (format #f "#define GNU_USER_TARGET_LIB_SPEC \
236 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
237 libc libc libdir suffix))
238 (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
239 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
240 #define STANDARD_STARTFILE_PREFIX_2 \"\"
244 ;; Don't retain a dependency on the build-time sed.
245 (substitute* "fixincludes/fixincl.x"
246 (("static char const sed_cmd_z\\[\\] =.*;")
247 "static char const sed_cmd_z[] = \"sed\";"))
249 (when (file-exists? "libbacktrace")
250 ;; GCC 4.8+ comes with libbacktrace. By default it builds
251 ;; with -Werror, which fails with a -Wcast-qual error in glibc
252 ;; 2.21's stdlib-bsearch.h. Remove -Werror.
253 (substitute* "libbacktrace/configure"
254 (("WARN_FLAGS=(.*)-Werror" _ flags)
255 (string-append "WARN_FLAGS=" flags)))
257 (when (file-exists? "libsanitizer/libbacktrace")
258 ;; Same in libsanitizer's bundled copy (!) found in 4.9+.
259 (substitute* "libsanitizer/libbacktrace/Makefile.in"
263 ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s.
264 ;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354>
265 ;; and <http://bugs.gnu.org/20358>.
266 (substitute* "libstdc++-v3/src/Makefile.in"
268 "OPT_LDFLAGS = -Wl,-rpath=$(libdir) "))
270 ;; Move libstdc++*-gdb.py to the "lib" output to avoid a
271 ;; circularity between "out" and "lib". (Note:
272 ;; --with-python-dir is useless because it imposes $(prefix) as
273 ;; the parent directory.)
274 (substitute* "libstdc++-v3/python/Makefile.in"
276 (string-append "pythondir = " libdir "/share"
277 "/gcc-$(gcc_version)/python\n")))
279 ;; Avoid another circularity between the outputs: this #define
280 ;; ends up in auto-host.h in the "lib" output, referring to
281 ;; "out". (This variable is used to augment cpp's search path,
282 ;; but there's nothing useful to look for here.)
283 (substitute* "gcc/config.in"
284 (("PREFIX_INCLUDE_DIR")
285 "PREFIX_INCLUDE_DIR_isnt_necessary_here"))))
288 'configure 'post-configure
290 ;; Don't store configure flags, to avoid retaining references to
291 ;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'.
292 (substitute* "Makefile"
293 (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
294 "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
298 ;; Use the language-specific variables rather than 'CPATH' because they
299 ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
300 ;; The intent is to allow headers that are in the search path to be
301 ;; treated as "system headers" (headers exempt from warnings) just like
302 ;; the typical /usr/include headers on an FHS system.
303 (list (search-path-specification
304 (variable "C_INCLUDE_PATH")
305 (files '("include")))
306 (search-path-specification
307 (variable "CPLUS_INCLUDE_PATH")
308 (files '("include")))
309 (search-path-specification
310 (variable "LIBRARY_PATH")
311 (files '("lib" "lib64")))))
313 (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
314 (synopsis "GNU Compiler Collection")
316 "GCC is the GNU Compiler Collection. It provides compiler front-ends
317 for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and
318 Go. It also includes runtime support libraries for these languages.")
320 (home-page "http://gcc.gnu.org/"))))
322 (define-public gcc-4.8
323 (package (inherit gcc-4.7)
327 (uri (string-append "mirror://gnu/gcc/gcc-"
328 version "/gcc-" version ".tar.bz2"))
331 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
332 (patches (search-patches "gcc-arm-link-spec-fix.patch"))))
334 ;; Texinfo 6.3 fails to build the manual:
335 ;; ../../gcc-4.8.5/gcc/doc/gcc.texi:208: no matching `@end tex'
337 (native-inputs `(("texinfo" ,texinfo-5)))))
339 (define-public gcc-4.9
340 (package (inherit gcc-4.7)
344 (uri (string-append "mirror://gnu/gcc/gcc-"
345 version "/gcc-" version ".tar.bz2"))
348 "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
349 (patches (search-patches "gcc-arm-bug-71399.patch"
350 "gcc-libvtv-runpath.patch"))))))
353 ;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
354 ;; them in a VPATH build.
355 (package (inherit gcc-4.9)
359 (uri (string-append "mirror://gnu/gcc/gcc-"
360 version "/gcc-" version ".tar.bz2"))
363 "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
364 (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
372 (uri (string-append "mirror://gnu/gcc/gcc-"
373 version "/gcc-" version ".tar.bz2"))
376 "1idpf43988v1a6i8lw9ak1r7igcfg1bm5kn011iydlr2qygmhi4r"))
377 (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
379 ;; Note: When changing the default gcc version, update
380 ;; the gcc-toolchain-* definitions accordingly.
381 (define-public gcc gcc-4.9)
383 (define-public (make-libstdc++ gcc)
384 "Return a libstdc++ package based on GCC. The primary use case is when
385 using compilers other than GCC."
390 `(#:out-of-source? #t
391 #:phases (alist-cons-before
394 (chdir "libstdc++-v3"))
396 #:configure-flags `("--disable-libstdcxx-pch"
397 ,(string-append "--with-gxx-include-dir="
398 (assoc-ref %outputs "out")
400 (outputs '("out" "debug"))
403 (propagated-inputs '())
404 (synopsis "GNU C++ standard library")))
406 (define-public libstdc++-4.9
407 (make-libstdc++ gcc-4.9))
409 (define (make-libiberty gcc)
410 "Return a libiberty package based on GCC."
415 `(#:out-of-source? #t
417 (modify-phases %standard-phases
418 (add-before 'configure 'chdir
424 (lambda* (#:key outputs #:allow-other-keys)
425 (let* ((out (assoc-ref outputs "out"))
426 (lib (string-append out "/lib/"))
427 (include (string-append out "/include/")))
430 (copy-file "libiberty.a"
431 (string-append lib "libiberty.a"))
432 (copy-file "../include/libiberty.h"
433 (string-append include "libiberty.h"))
438 (propagated-inputs '())
439 (synopsis "Collection of subroutines used by various GNU programs")))
441 (define-public libiberty
442 (make-libiberty gcc))
444 (define* (custom-gcc gcc name languages
446 (search-paths (package-native-search-paths gcc))
447 #:key (separate-lib-output? #t))
448 "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS
449 as the 'native-search-paths' field."
450 (package (inherit gcc)
452 (outputs (if separate-lib-output?
453 (package-outputs gcc)
454 (delete "lib" (package-outputs gcc))))
455 (native-search-paths search-paths)
457 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
462 ,@(package-arguments gcc))
463 ((#:configure-flags flags)
464 `(cons (string-append "--enable-languages="
465 ,(string-join languages ","))
466 (remove (cut string-match "--enable-languages.*" <>)
469 `(modify-phases ,phases
470 (add-after 'install 'remove-broken-or-conflicting-files
471 (lambda* (#:key outputs #:allow-other-keys)
472 (for-each delete-file
473 (find-files (string-append (assoc-ref outputs "out") "/bin")
474 ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
477 (define %generic-search-paths
478 ;; This is the language-neutral search path for GCC. Entries in $CPATH are
479 ;; not considered "system headers", which means GCC can raise warnings for
480 ;; issues in those headers. 'CPATH' is the only one that works for
481 ;; front-ends not in the C family.
482 (list (search-path-specification
484 (files '("include")))
485 (search-path-specification
486 (variable "LIBRARY_PATH")
487 (files '("lib" "lib64")))))
489 (define-public gfortran-4.8
490 (custom-gcc gcc-4.8 "gfortran" '("fortran")
491 %generic-search-paths))
493 (define-public gfortran-4.9
494 (custom-gcc gcc-4.9 "gfortran" '("fortran")
495 %generic-search-paths))
497 (define-public gfortran
498 (custom-gcc gcc "gfortran" '("fortran")
499 %generic-search-paths))
501 (define-public gfortran-5
502 (custom-gcc gcc-5 "gfortran" '("fortran")
503 %generic-search-paths))
505 (define-public gccgo-4.9
506 (custom-gcc gcc-4.9 "gccgo" '("go")
507 %generic-search-paths
508 ;; Suppress the separate "lib" output, because otherwise the
509 ;; "lib" and "out" outputs would refer to each other, creating
510 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
511 #:separate-lib-output? #f))
516 (uri (string-append "http://sources.gentoo.org/cgi-bin/viewvc.cgi/"
517 "gentoo-x86/dev-java/gcj-jdk/files/javac.in?revision=1.1"))
518 (file-name "javac.in")
520 "1c3dk4z5yfj6ic2fn3lyxs27n6pmn2wy9k0r1s17lnkf1bzkrciv"))))
523 (package (inherit gcc)
526 `(("fastjar" ,fastjar)
528 ("javac.in" ,javac.in)
529 ("ecj-bootstrap" ,ecj-bootstrap)
530 ,@(package-inputs gcc)))
532 `(("dejagnu" ,dejagnu)
533 ,@(package-native-inputs gcc)))
534 (native-search-paths %generic-search-paths)
536 ;; Suppress the separate "lib" output, because otherwise the
537 ;; "lib" and "out" outputs would refer to each other, creating
538 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
540 (delete "lib" (package-outputs gcc)))
542 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
547 #:test-target "check-target-libjava"
548 ,@(package-arguments gcc))
550 ((#:configure-flags flags)
551 `(let ((ecj (assoc-ref %build-inputs "ecj-bootstrap")))
552 `("--enable-java-home"
554 ,(string-append "--with-ecj-jar=" ecj)
555 "--enable-languages=java"
556 ,@(remove (cut string-match "--enable-languages.*" <>)
559 `(modify-phases ,phases
561 'unpack 'add-lib-output-to-rpath
563 (substitute* "libjava/Makefile.in"
564 (("libgcj_bc_dummy_LINK = .* -shared" line)
565 (string-append line " -Wl,-rpath=$(libdir)"))
566 (("libgcj(_bc)?_la_LDFLAGS =" ldflags _)
567 (string-append ldflags " -Wl,-rpath=$(libdir)")))))
569 'unpack 'patch-testsuite
570 ;; dejagnu-1.6 removes the 'absolute' command
572 (substitute* "libjava/testsuite/lib/libjava.exp"
573 (("absolute") "file normalize"))
576 'install 'install-javac-and-javap-wrappers
578 (let* ((javac (assoc-ref %build-inputs "javac.in"))
579 (ecj (assoc-ref %build-inputs "ecj-bootstrap"))
580 (gcj (assoc-ref %outputs "out"))
581 (gcjbin (string-append gcj "/bin/"))
582 (jvm (string-append gcj "/lib/jvm/"))
583 (target (string-append jvm "/bin/javac")))
585 (symlink (string-append gcjbin "jcf-dump")
586 (string-append jvm "/bin/javap"))
588 (copy-file ecj (string-append gcj "/share/java/ecj.jar"))
590 ;; Create javac wrapper from the template javac.in by
591 ;; replacing the @VARIABLES@ with paths.
592 (copy-file javac target)
593 (patch-shebang target)
596 (string-append jvm "/bin/java"))
598 (string-append gcj "/share/java/ecj.jar"))
600 (string-append jvm "/jre/lib/rt.jar"))
602 (string-append jvm "/lib/tools.jar")))
606 'install 'remove-broken-or-conflicting-files
608 (let ((out (assoc-ref %outputs "out")))
611 (append (find-files (string-append out "/lib/jvm/jre/lib")
613 (find-files (string-append out "/bin")
614 ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)"))))
617 (define ecj-bootstrap
620 (uri "ftp://sourceware.org/pub/java/ecj-4.9.jar")
623 "1k9lgm3qamf6zy534pa2zwskr8mpiqrngbv1vw9j4y1ghrdyf1lm"))))
625 (define-public gcc-objc-4.8
626 (custom-gcc gcc-4.8 "gcc-objc" '("objc")
627 (list (search-path-specification
628 (variable "OBJC_INCLUDE_PATH")
629 (files '("include")))
630 (search-path-specification
631 (variable "LIBRARY_PATH")
632 (files '("lib" "lib64"))))))
634 (define-public gcc-objc-4.9
635 (custom-gcc gcc-4.9 "gcc-objc" '("objc")
636 (list (search-path-specification
637 (variable "OBJC_INCLUDE_PATH")
638 (files '("include")))
639 (search-path-specification
640 (variable "LIBRARY_PATH")
641 (files '("lib" "lib64"))))))
643 (define-public gcc-objc gcc-objc-4.9)
645 (define-public gcc-objc++-4.8
646 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")
647 (list (search-path-specification
648 (variable "OBJCPLUS_INCLUDE_PATH")
649 (files '("include")))
650 (search-path-specification
651 (variable "LIBRARY_PATH")
652 (files '("lib" "lib64"))))))
654 (define-public gcc-objc++-4.9
655 (custom-gcc gcc-4.9 "gcc-objc++" '("obj-c++")
656 (list (search-path-specification
657 (variable "OBJCPLUS_INCLUDE_PATH")
658 (files '("include")))
659 (search-path-specification
660 (variable "LIBRARY_PATH")
661 (files '("lib" "lib64"))))))
663 (define-public gcc-objc++ gcc-objc++-4.9)
665 (define (make-libstdc++-doc gcc)
666 "Return a package with the libstdc++ documentation for GCC."
669 (name "libstdc++-doc")
670 (version (package-version gcc))
671 (synopsis "GNU libstdc++ documentation")
673 (native-inputs `(("doxygen" ,doxygen)
677 ("docbook-xml" ,docbook-xml)
678 ("docbook-xsl" ,docbook-xsl)
679 ("graphviz" ,graphviz))) ;for 'dot', invoked by 'doxygen'
681 (propagated-inputs '())
683 '(#:out-of-source? #t
684 #:tests? #f ;it's just documentation
685 #:phases (modify-phases %standard-phases
686 (add-before 'configure 'chdir
688 (chdir "libstdc++-v3")))
689 (add-before 'configure 'set-xsl-directory
690 (lambda* (#:key inputs #:allow-other-keys)
691 (let ((docbook (assoc-ref inputs "docbook-xsl")))
692 (substitute* (find-files "doc"
697 (strip-store-file-name docbook)))))))
700 ;; XXX: There's also a 'doc-info' target, but it
701 ;; relies on docbook2X, which itself relies on
702 ;; DocBook 4.1.2, which is not really usable
703 ;; (lacks a catalog.xml.)
704 (zero? (system* "make"
708 (lambda* (#:key outputs #:allow-other-keys)
709 (let ((out (assoc-ref outputs "out")))
710 (zero? (system* "make"
712 "doc-install-man"))))))))))
714 (define-public libstdc++-doc-4.9
715 (make-libstdc++-doc gcc-4.9))
717 (define-public libstdc++-doc-5
718 (make-libstdc++-doc gcc-5))
726 (uri (list (string-append
727 "http://isl.gforge.inria.fr/isl-"
730 (string-append %gcc-infrastructure
731 name "-" version ".tar.gz")))
734 "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))
735 (patches (search-patches "isl-0.11.1-aarch64-support.patch"))))
736 (build-system gnu-build-system)
737 (inputs `(("gmp" ,gmp)))
738 (home-page "http://isl.gforge.inria.fr/")
740 "Manipulating sets and relations of integer points \
741 bounded by linear constraints")
743 "isl is a library for manipulating sets and relations of integer points
744 bounded by linear constraints. Supported operations on sets include
745 intersection, union, set difference, emptiness check, convex hull, (integer)
746 affine hull, integer projection, computing the lexicographic minimum using
747 parametric integer programming, coalescing and parametric vertex
748 enumeration. It also includes an ILP solver based on generalized basis
749 reduction, transitive closures on maps (which may encode infinite graphs),
750 dependence analysis and bounds on piecewise step-polynomials.")
760 (uri (list (string-append
761 "http://www.bastoul.net/cloog/pages/download/count.php3?url=cloog-"
764 (string-append %gcc-infrastructure
765 name "-" version ".tar.gz")))
768 "0a12rwfwp22zd0nlld0xyql11cj390rrq1prw35yjsw8wzfshjhw"))
769 (file-name (string-append name "-" version ".tar.gz"))))
770 (build-system gnu-build-system)
771 (inputs `(("gmp" ,gmp)
773 (arguments '(#:configure-flags '("--with-isl=system")))
774 (home-page "http://www.cloog.org/")
775 (synopsis "Library to generate code for scanning Z-polyhedra")
777 "CLooG is a free software library to generate code for scanning
778 Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that
779 reaches each integral point of one or more parameterized polyhedra.
780 CLooG has been originally written to solve the code generation problem
781 for optimizing compilers based on the polytope model. Nevertheless it
782 is used now in various area e.g., to build control automata for
783 high-level synthesis or to find the best polynomial approximation of a
784 function. CLooG may help in any situation where scanning polyhedra
785 matters. While the user has full control on generated code quality,
786 CLooG is designed to avoid control overhead and to produce a very
790 (define-public gnu-c-manual
792 (name "gnu-c-manual")
796 (uri (string-append "mirror://gnu/gnu-c-manual/gnu-c-manual-"
800 "1sfsj9256w18qzylgag2h5h377aq8in8929svblfnj9svfriqcys"))))
801 (build-system gnu-build-system)
802 (native-inputs `(("texinfo" ,texinfo)))
804 '(#:phases (modify-phases %standard-phases
809 (zero? (system* "make"
811 "gnu-c-manual.html"))))
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let* ((out (assoc-ref outputs "out"))
815 (info (string-append out "/share/info"))
817 out "/share/doc/gnu-c-manual")))
821 (for-each (lambda (file)
823 (string-append info "/"
825 (find-files "." "\\.info(-[0-9])?$"))
826 (for-each (lambda (file)
828 (string-append html "/"
830 (find-files "." "\\.html$"))
832 (synopsis "Reference manual for the C programming language")
834 "This is a reference manual for the C programming language, as
835 implemented by the GNU C Compiler (gcc). As a reference, it is not intended
836 to be a tutorial of the language. Rather, it outlines all of the constructs
837 of the language. Library functions are not included.")
838 (home-page "http://www.gnu.org/software/gnu-c-manual")