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 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 (ice-9 regex))
45 (define %gcc-infrastructure
46 ;; Base URL for GCC's infrastructure.
47 "ftp://gcc.gnu.org/pub/gcc/infrastructure/")
49 (define (gcc-configure-flags-for-triplet target)
50 "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
52 The purpose of this procedure is to translate extended GNU triplets---e.g.,
53 where the OS part is overloaded to denote a specific ABI---into GCC
54 `configure' options. We take extended GNU triplets that glibc recognizes."
55 (cond ((string-match "^mips64el.*gnuabin?64$" target)
56 ;; Triplets recognized by glibc as denoting the N64 ABI; see
57 ;; ports/sysdeps/mips/preconfigure.
60 ((string-match "^arm.*-gnueabihf$" target)
61 '("--with-arch=armv7-a"
67 ;; TODO: Add `arm.*-gnueabi', etc.
70 (define-public gcc-4.7
71 (let* ((stripped? #t) ;whether to strip the compiler, not the libraries
74 ;; Return the `_FOR_TARGET' variables that are needed when
75 ;; cross-compiling GCC.
76 (let ((target (%current-target-system)))
78 (map (lambda (var tool)
79 (string-append (string-append var "_FOR_TARGET")
81 '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
82 '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
85 (let ((base '(or (assoc-ref outputs "lib")
86 (assoc-ref outputs "out"))))
88 ;; Return the directory that contains lib/libgcc_s.so et al.
89 (if (%current-target-system)
90 `(string-append ,base "/" ,(%current-target-system))
94 ;; This is terrible. Since we have two levels of quasiquotation,
95 ;; we have to do this convoluted thing just so we can insert the
96 ;; contents of (maybe-target-tools).
100 "--enable-languages=c,c++"
104 ;; No pre-compiled libstdc++ headers, to save space.
105 "--disable-libstdcxx-pch"
107 "--with-local-prefix=/no-gcc-local-prefix"
109 ;; With a separate "lib" output, the build system
110 ;; incorrectly guesses GPLUSPLUS_INCLUDE_DIR, so force
111 ;; it. (Don't use a versioned sub-directory, that's
113 ,(string-append "--with-gxx-include-dir="
114 (assoc-ref %outputs "out")
117 ,(let ((libc (assoc-ref %build-inputs "libc")))
119 (string-append "--with-native-system-header-dir=" libc
121 "--without-headers")))
123 ;; Pass the right options for the target triplet.
125 (or (%current-target-system)
126 (nix-system->gnu-triplet (%current-system)))))
127 (gcc-configure-flags-for-triplet triplet))
129 (maybe-target-tools))))))
135 (uri (string-append "mirror://gnu/gcc/gcc-"
136 version "/gcc-" version ".tar.bz2"))
139 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
140 (build-system gnu-build-system)
142 ;; Separate out the run-time support libraries because all the
143 ;; dynamic-linked objects depend on it.
144 (outputs '("out" ;commands, etc. (60+ MiB)
145 "lib" ;libgcc_s, libgomp, etc. (15+ MiB)
146 "debug")) ;debug symbols of run-time libraries
148 (inputs `(("gmp" ,gmp)
156 ;; GCC is one of the few packages that doesn't ship .info files.
157 (native-inputs `(("texinfo" ,texinfo)))
160 `(#:out-of-source? #t
161 #:configure-flags ,(configure-flags)
163 ;; None of the flags below are needed when doing a Canadian cross.
164 ;; TODO: Simplify this.
165 ,(if (%current-target-system)
169 `(let* ((libc (assoc-ref %build-inputs "libc"))
170 (libc-native (or (assoc-ref %build-inputs "libc-native")
173 (list (string-append "LDFLAGS_FOR_TARGET="
175 "-Wl,-dynamic-linker "
177 ,(glibc-dynamic-linker)))
180 ;; Native programs like 'genhooks' also need that right.
181 ,(string-append "LDFLAGS="
182 "-Wl,-rpath=" libc-native "/lib "
183 "-Wl,-dynamic-linker "
184 "-Wl," libc-native ,(glibc-dynamic-linker))
185 ,(string-append "BOOT_CFLAGS=-O2 "
186 ,(if stripped? "-g0" "-g")))))
192 'configure 'pre-configure
193 (lambda* (#:key inputs outputs #:allow-other-keys)
194 (let ((libdir ,(libdir))
195 (libc (assoc-ref inputs "libc")))
197 ;; The following is not performed for `--without-headers'
198 ;; cross-compiler builds.
200 ;; Join multi-line definitions of GLIBC_DYNAMIC_LINKER* into a
201 ;; single line, to allow the next step to work properly.
204 (substitute* (find-files "gcc/config"
205 "^linux(64|-elf|-eabi)?\\.h$")
206 (("(#define GLIBC_DYNAMIC_LINKER.*)\\\\\n$" _ line)
210 ;; Fix the dynamic linker's file name.
211 (substitute* (find-files "gcc/config"
212 "^(linux|gnu)(64|-elf|-eabi)?\\.h$")
213 (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
214 (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
216 (string-append libc ,(glibc-dynamic-linker)))))
218 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
219 ;; `crt{begin,end}.o', which come with GCC.
220 (substitute* (find-files "gcc/config"
222 (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix)
223 ;; Help libgcc_s.so be found (see also below.) Always use
224 ;; '-lgcc_s' so that libgcc_s.so is always found by those
225 ;; programs that use 'pthread_cancel' (glibc dlopens
226 ;; libgcc_s.so when pthread_cancel support is needed, but
227 ;; having it in the application's RUNPATH isn't enough; see
228 ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
230 ;; NOTE: The '-lgcc_s' added below needs to be removed in a
231 ;; later phase of %gcc-static. If you change the string
232 ;; below, make sure to update the relevant code in
233 ;; %gcc-static package as needed.
234 (format #f "#define GNU_USER_TARGET_LIB_SPEC \
235 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
236 libc libc libdir suffix))
237 (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
238 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
239 #define STANDARD_STARTFILE_PREFIX_2 \"\"
243 ;; Don't retain a dependency on the build-time sed.
244 (substitute* "fixincludes/fixincl.x"
245 (("static char const sed_cmd_z\\[\\] =.*;")
246 "static char const sed_cmd_z[] = \"sed\";"))
248 (when (file-exists? "libbacktrace")
249 ;; GCC 4.8+ comes with libbacktrace. By default it builds
250 ;; with -Werror, which fails with a -Wcast-qual error in glibc
251 ;; 2.21's stdlib-bsearch.h. Remove -Werror.
252 (substitute* "libbacktrace/configure"
253 (("WARN_FLAGS=(.*)-Werror" _ flags)
254 (string-append "WARN_FLAGS=" flags)))
256 (when (file-exists? "libsanitizer/libbacktrace")
257 ;; Same in libsanitizer's bundled copy (!) found in 4.9+.
258 (substitute* "libsanitizer/libbacktrace/Makefile.in"
262 ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s.
263 ;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354>
264 ;; and <http://bugs.gnu.org/20358>.
265 (substitute* "libstdc++-v3/src/Makefile.in"
267 "OPT_LDFLAGS = -Wl,-rpath=$(libdir) "))
269 ;; Move libstdc++*-gdb.py to the "lib" output to avoid a
270 ;; circularity between "out" and "lib". (Note:
271 ;; --with-python-dir is useless because it imposes $(prefix) as
272 ;; the parent directory.)
273 (substitute* "libstdc++-v3/python/Makefile.in"
275 (string-append "pythondir = " libdir "/share"
276 "/gcc-$(gcc_version)/python\n")))
278 ;; Avoid another circularity between the outputs: this #define
279 ;; ends up in auto-host.h in the "lib" output, referring to
280 ;; "out". (This variable is used to augment cpp's search path,
281 ;; but there's nothing useful to look for here.)
282 (substitute* "gcc/config.in"
283 (("PREFIX_INCLUDE_DIR")
284 "PREFIX_INCLUDE_DIR_isnt_necessary_here"))))
287 'configure 'post-configure
289 ;; Don't store configure flags, to avoid retaining references to
290 ;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'.
291 (substitute* "Makefile"
292 (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
293 "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
297 ;; Use the language-specific variables rather than 'CPATH' because they
298 ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
299 ;; The intent is to allow headers that are in the search path to be
300 ;; treated as "system headers" (headers exempt from warnings) just like
301 ;; the typical /usr/include headers on an FHS system.
302 (list (search-path-specification
303 (variable "C_INCLUDE_PATH")
304 (files '("include")))
305 (search-path-specification
306 (variable "CPLUS_INCLUDE_PATH")
307 (files '("include")))
308 (search-path-specification
309 (variable "LIBRARY_PATH")
310 (files '("lib" "lib64")))))
312 (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
313 (synopsis "GNU Compiler Collection")
315 "GCC is the GNU Compiler Collection. It provides compiler front-ends
316 for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and
317 Go. It also includes runtime support libraries for these languages.")
319 (home-page "http://gcc.gnu.org/"))))
321 (define-public gcc-4.8
322 (package (inherit gcc-4.7)
326 (uri (string-append "mirror://gnu/gcc/gcc-"
327 version "/gcc-" version ".tar.bz2"))
330 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
331 (patches (search-patches "gcc-arm-link-spec-fix.patch"))))))
333 (define-public gcc-4.9
334 (package (inherit gcc-4.8)
338 (uri (string-append "mirror://gnu/gcc/gcc-"
339 version "/gcc-" version ".tar.bz2"))
342 "0zmnm00d2a1hsd41g34bhvxzvxisa2l584q3p447bd91lfjv4ci3"))
343 (patches (search-patches "gcc-libvtv-runpath.patch"))))))
346 (package (inherit gcc-4.9)
350 (uri (string-append "mirror://gnu/gcc/gcc-"
351 version "/gcc-" version ".tar.bz2"))
354 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"))
355 (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
363 (uri (string-append "mirror://gnu/gcc/gcc-"
364 version "/gcc-" version ".tar.bz2"))
367 "0ld3y4rgimyqgx1nwvzqyl5gr4wzc0ch4akkvsqp3fgbmdfcii09"))
368 (patches (search-patches "gcc-5.0-libvtv-runpath.patch"))))))
370 ;; Note: When changing the default gcc version, update
371 ;; the gcc-toolchain-* definitions accordingly.
372 (define-public gcc gcc-4.9)
374 (define-public (make-libstdc++ gcc)
375 "Return a libstdc++ package based on GCC. The primary use case is when
376 using compilers other than GCC."
381 `(#:out-of-source? #t
382 #:phases (alist-cons-before
385 (chdir "libstdc++-v3"))
387 #:configure-flags `("--disable-libstdcxx-pch"
388 ,(string-append "--with-gxx-include-dir="
389 (assoc-ref %outputs "out")
391 (outputs '("out" "debug"))
394 (propagated-inputs '())
395 (synopsis "GNU C++ standard library")))
397 (define-public libstdc++-4.9
398 (make-libstdc++ gcc-4.9))
400 (define (make-libiberty gcc)
401 "Return a libiberty package based on GCC."
406 `(#:out-of-source? #t
408 (modify-phases %standard-phases
409 (add-before 'configure 'chdir
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (lib (string-append out "/lib/"))
418 (include (string-append out "/include/")))
421 (copy-file "libiberty.a"
422 (string-append lib "libiberty.a"))
423 (copy-file "../include/libiberty.h"
424 (string-append include "libiberty.h"))
429 (propagated-inputs '())
430 (synopsis "Collection of subroutines used by various GNU programs")))
432 (define-public libiberty
433 (make-libiberty gcc))
435 (define* (custom-gcc gcc name languages
437 (search-paths (package-native-search-paths gcc))
438 #:key (separate-lib-output? #t))
439 "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS
440 as the 'native-search-paths' field."
441 (package (inherit gcc)
443 (outputs (if separate-lib-output?
444 (package-outputs gcc)
445 (delete "lib" (package-outputs gcc))))
446 (native-search-paths search-paths)
448 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
453 ,@(package-arguments gcc))
454 ((#:configure-flags flags)
455 `(cons (string-append "--enable-languages="
456 ,(string-join languages ","))
457 (remove (cut string-match "--enable-languages.*" <>)
460 `(modify-phases ,phases
461 (add-after 'install 'remove-broken-or-conflicting-files
462 (lambda* (#:key outputs #:allow-other-keys)
463 (for-each delete-file
464 (find-files (string-append (assoc-ref outputs "out") "/bin")
465 ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
468 (define %generic-search-paths
469 ;; This is the language-neutral search path for GCC. Entries in $CPATH are
470 ;; not considered "system headers", which means GCC can raise warnings for
471 ;; issues in those headers. 'CPATH' is the only one that works for
472 ;; front-ends not in the C family.
473 (list (search-path-specification
475 (files '("include")))
476 (search-path-specification
477 (variable "LIBRARY_PATH")
478 (files '("lib" "lib64")))))
480 (define-public gfortran-4.8
481 (custom-gcc gcc-4.8 "gfortran" '("fortran")
482 %generic-search-paths))
484 (define-public gfortran-4.9
485 (custom-gcc gcc-4.9 "gfortran" '("fortran")
486 %generic-search-paths))
488 (define-public gfortran
489 (custom-gcc gcc "gfortran" '("fortran")
490 %generic-search-paths))
492 (define-public gfortran-5
493 (custom-gcc gcc-5 "gfortran" '("fortran")
494 %generic-search-paths))
496 (define-public gccgo-4.9
497 (custom-gcc gcc-4.9 "gccgo" '("go")
498 %generic-search-paths
499 ;; Suppress the separate "lib" output, because otherwise the
500 ;; "lib" and "out" outputs would refer to each other, creating
501 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
502 #:separate-lib-output? #f))
507 (uri (string-append "http://sources.gentoo.org/cgi-bin/viewvc.cgi/"
508 "gentoo-x86/dev-java/gcj-jdk/files/javac.in?revision=1.1"))
509 (file-name "javac.in")
511 "1c3dk4z5yfj6ic2fn3lyxs27n6pmn2wy9k0r1s17lnkf1bzkrciv"))))
514 (package (inherit gcc)
517 `(("fastjar" ,fastjar)
519 ("javac.in" ,javac.in)
520 ("ecj-bootstrap" ,ecj-bootstrap)
521 ,@(package-inputs gcc)))
523 `(("dejagnu" ,dejagnu)
524 ,@(package-native-inputs gcc)))
525 (native-search-paths %generic-search-paths)
527 ;; Suppress the separate "lib" output, because otherwise the
528 ;; "lib" and "out" outputs would refer to each other, creating
529 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
531 (delete "lib" (package-outputs gcc)))
533 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
538 #:test-target "check-target-libjava"
539 ,@(package-arguments gcc))
541 ((#:configure-flags flags)
542 `(let ((ecj (assoc-ref %build-inputs "ecj-bootstrap")))
543 `("--enable-java-home"
545 ,(string-append "--with-ecj-jar=" ecj)
546 "--enable-languages=java"
547 ,@(remove (cut string-match "--enable-languages.*" <>)
550 `(modify-phases ,phases
552 'unpack 'add-lib-output-to-rpath
554 (substitute* "libjava/Makefile.in"
555 (("libgcj_bc_dummy_LINK = .* -shared" line)
556 (string-append line " -Wl,-rpath=$(libdir)"))
557 (("libgcj(_bc)?_la_LDFLAGS =" ldflags _)
558 (string-append ldflags " -Wl,-rpath=$(libdir)")))))
560 'install 'install-javac-and-javap-wrappers
562 (let* ((javac (assoc-ref %build-inputs "javac.in"))
563 (ecj (assoc-ref %build-inputs "ecj-bootstrap"))
564 (gcj (assoc-ref %outputs "out"))
565 (gcjbin (string-append gcj "/bin/"))
566 (jvm (string-append gcj "/lib/jvm/"))
567 (target (string-append jvm "/bin/javac")))
569 (symlink (string-append gcjbin "jcf-dump")
570 (string-append jvm "/bin/javap"))
572 (copy-file ecj (string-append gcj "/share/java/ecj.jar"))
574 ;; Create javac wrapper from the template javac.in by
575 ;; replacing the @VARIABLES@ with paths.
576 (copy-file javac target)
577 (patch-shebang target)
580 (string-append jvm "/bin/java"))
582 (string-append gcj "/share/java/ecj.jar"))
584 (string-append jvm "/jre/lib/rt.jar"))
586 (string-append jvm "/lib/tools.jar")))
590 'install 'remove-broken-or-conflicting-files
592 (let ((out (assoc-ref %outputs "out")))
595 (append (find-files (string-append out "/lib/jvm/jre/lib")
597 (find-files (string-append out "/bin")
598 ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)"))))
601 (define ecj-bootstrap
604 (uri "ftp://sourceware.org/pub/java/ecj-4.9.jar")
607 "1k9lgm3qamf6zy534pa2zwskr8mpiqrngbv1vw9j4y1ghrdyf1lm"))))
609 (define-public gcc-objc-4.8
610 (custom-gcc gcc-4.8 "gcc-objc" '("objc")
611 (list (search-path-specification
612 (variable "OBJC_INCLUDE_PATH")
613 (files '("include")))
614 (search-path-specification
615 (variable "LIBRARY_PATH")
616 (files '("lib" "lib64"))))))
618 (define-public gcc-objc-4.9
619 (custom-gcc gcc-4.9 "gcc-objc" '("objc")
620 (list (search-path-specification
621 (variable "OBJC_INCLUDE_PATH")
622 (files '("include")))
623 (search-path-specification
624 (variable "LIBRARY_PATH")
625 (files '("lib" "lib64"))))))
627 (define-public gcc-objc gcc-objc-4.9)
629 (define-public gcc-objc++-4.8
630 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")
631 (list (search-path-specification
632 (variable "OBJCPLUS_INCLUDE_PATH")
633 (files '("include")))
634 (search-path-specification
635 (variable "LIBRARY_PATH")
636 (files '("lib" "lib64"))))))
638 (define-public gcc-objc++-4.9
639 (custom-gcc gcc-4.9 "gcc-objc++" '("obj-c++")
640 (list (search-path-specification
641 (variable "OBJCPLUS_INCLUDE_PATH")
642 (files '("include")))
643 (search-path-specification
644 (variable "LIBRARY_PATH")
645 (files '("lib" "lib64"))))))
647 (define-public gcc-objc++ gcc-objc++-4.9)
649 (define (make-libstdc++-doc gcc)
650 "Return a package with the libstdc++ documentation for GCC."
653 (name "libstdc++-doc")
654 (version (package-version gcc))
655 (synopsis "GNU libstdc++ documentation")
657 (native-inputs `(("doxygen" ,doxygen)
661 ("docbook-xml" ,docbook-xml)
662 ("docbook-xsl" ,docbook-xsl)
663 ("graphviz" ,graphviz))) ;for 'dot', invoked by 'doxygen'
665 (propagated-inputs '())
667 '(#:out-of-source? #t
668 #:tests? #f ;it's just documentation
669 #:phases (modify-phases %standard-phases
670 (add-before 'configure 'chdir
672 (chdir "libstdc++-v3")))
673 (add-before 'configure 'set-xsl-directory
674 (lambda* (#:key inputs #:allow-other-keys)
675 (let ((docbook (assoc-ref inputs "docbook-xsl")))
676 (substitute* (find-files "doc"
681 (strip-store-file-name docbook)))))))
684 ;; XXX: There's also a 'doc-info' target, but it
685 ;; relies on docbook2X, which itself relies on
686 ;; DocBook 4.1.2, which is not really usable
687 ;; (lacks a catalog.xml.)
688 (zero? (system* "make"
692 (lambda* (#:key outputs #:allow-other-keys)
693 (let ((out (assoc-ref outputs "out")))
694 (zero? (system* "make"
696 "doc-install-man"))))))))))
698 (define-public libstdc++-doc-4.9
699 (make-libstdc++-doc gcc-4.9))
701 (define-public libstdc++-doc-5
702 (make-libstdc++-doc gcc-5))
710 (uri (list (string-append
711 "http://isl.gforge.inria.fr/isl-"
714 (string-append %gcc-infrastructure
715 name "-" version ".tar.gz")))
718 "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))))
719 (build-system gnu-build-system)
720 (inputs `(("gmp" ,gmp)))
721 (home-page "http://isl.gforge.inria.fr/")
723 "Manipulating sets and relations of integer points \
724 bounded by linear constraints")
726 "isl is a library for manipulating sets and relations of integer points
727 bounded by linear constraints. Supported operations on sets include
728 intersection, union, set difference, emptiness check, convex hull, (integer)
729 affine hull, integer projection, computing the lexicographic minimum using
730 parametric integer programming, coalescing and parametric vertex
731 enumeration. It also includes an ILP solver based on generalized basis
732 reduction, transitive closures on maps (which may encode infinite graphs),
733 dependence analysis and bounds on piecewise step-polynomials.")
743 (uri (list (string-append
744 "http://www.bastoul.net/cloog/pages/download/count.php3?url=cloog-"
747 (string-append %gcc-infrastructure
748 name "-" version ".tar.gz")))
751 "0a12rwfwp22zd0nlld0xyql11cj390rrq1prw35yjsw8wzfshjhw"))
752 (file-name (string-append name "-" version ".tar.gz"))))
753 (build-system gnu-build-system)
754 (inputs `(("gmp" ,gmp)
756 (arguments '(#:configure-flags '("--with-isl=system")))
757 (home-page "http://www.cloog.org/")
758 (synopsis "Library to generate code for scanning Z-polyhedra")
760 "CLooG is a free software library to generate code for scanning
761 Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that
762 reaches each integral point of one or more parameterized polyhedra.
763 CLooG has been originally written to solve the code generation problem
764 for optimizing compilers based on the polytope model. Nevertheless it
765 is used now in various area e.g., to build control automata for
766 high-level synthesis or to find the best polynomial approximation of a
767 function. CLooG may help in any situation where scanning polyhedra
768 matters. While the user has full control on generated code quality,
769 CLooG is designed to avoid control overhead and to produce a very
773 (define-public gnu-c-manual
775 (name "gnu-c-manual")
779 (uri (string-append "mirror://gnu/gnu-c-manual/gnu-c-manual-"
783 "0cf4503shr7hxkbrjfi9dky6q2lqk95bgbgbjmvj2s2x312kakd9"))))
784 (build-system gnu-build-system)
785 (native-inputs `(("texinfo" ,texinfo)))
787 '(#:phases (modify-phases %standard-phases
792 (zero? (system* "make"
794 "gnu-c-manual.html"))))
796 (lambda* (#:key outputs #:allow-other-keys)
797 (let* ((out (assoc-ref outputs "out"))
798 (info (string-append out "/share/info"))
800 out "/share/doc/gnu-c-manual")))
804 (for-each (lambda (file)
806 (string-append info "/"
808 (find-files "." "\\.info(-[0-9])?$"))
809 (for-each (lambda (file)
811 (string-append html "/"
813 (find-files "." "\\.html$"))
815 (synopsis "Reference manual for the C programming language")
817 "This is a reference manual for the C programming language, as
818 implemented by the GNU C Compiler (gcc). As a reference, it is not intended
819 to be a tutorial of the language. Rather, it outlines all of the constructs
820 of the language. Library functions are not included.")
821 (home-page "http://www.gnu.org/software/gnu-c-manual")