1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014, 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages gcc)
25 #:use-module ((guix licenses)
26 #:select (gpl3+ gpl2+ lgpl2.1+ lgpl2.0+ fdl1.3+))
27 #:use-module (gnu packages)
28 #:use-module (gnu packages bootstrap)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages multiprecision)
31 #:use-module (gnu packages texinfo)
32 #:use-module (gnu packages dejagnu)
33 #:use-module (gnu packages documentation)
34 #:use-module (gnu packages xml)
35 #:use-module (gnu packages docbook)
36 #:use-module (gnu packages graphviz)
37 #:use-module (gnu packages elf)
38 #:use-module (gnu packages perl)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system trivial)
43 #:use-module (guix utils)
44 #:use-module (srfi srfi-1)
45 #:use-module (ice-9 regex))
47 (define %gcc-infrastructure
48 ;; Base URL for GCC's infrastructure.
49 "mirror://gcc/infrastructure/")
51 (define (gcc-configure-flags-for-triplet target)
52 "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
54 The purpose of this procedure is to translate extended GNU triplets---e.g.,
55 where the OS part is overloaded to denote a specific ABI---into GCC
56 `configure' options. We take extended GNU triplets that glibc recognizes."
57 (cond ((string-match "^mips64el.*gnuabin?64$" target)
58 ;; Triplets recognized by glibc as denoting the N64 ABI; see
59 ;; ports/sysdeps/mips/preconfigure.
62 ((string-match "^arm.*-gnueabihf$" target)
63 '("--with-arch=armv7-a"
69 ;; TODO: Add `arm.*-gnueabi', etc.
72 (define-public gcc-4.7
73 (let* ((stripped? #t) ;whether to strip the compiler, not the libraries
76 ;; Return the `_FOR_TARGET' variables that are needed when
77 ;; cross-compiling GCC.
78 (let ((target (%current-target-system)))
80 (map (lambda (var tool)
81 (string-append (string-append var "_FOR_TARGET")
83 '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
84 '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
87 (let ((base '(or (assoc-ref outputs "lib")
88 (assoc-ref outputs "out"))))
90 ;; Return the directory that contains lib/libgcc_s.so et al.
91 (if (%current-target-system)
92 `(string-append ,base "/" ,(%current-target-system))
96 ;; This is terrible. Since we have two levels of quasiquotation,
97 ;; we have to do this convoluted thing just so we can insert the
98 ;; contents of (maybe-target-tools).
102 "--enable-languages=c,c++"
106 ;; No pre-compiled libstdc++ headers, to save space.
107 "--disable-libstdcxx-pch"
109 "--with-local-prefix=/no-gcc-local-prefix"
111 ;; With a separate "lib" output, the build system
112 ;; incorrectly guesses GPLUSPLUS_INCLUDE_DIR, so force
113 ;; it. (Don't use a versioned sub-directory, that's
115 ,(string-append "--with-gxx-include-dir="
116 (assoc-ref %outputs "out")
119 ,(let ((libc (assoc-ref %build-inputs "libc")))
121 (string-append "--with-native-system-header-dir=" libc
123 "--without-headers")))
125 ;; Pass the right options for the target triplet.
127 (or (%current-target-system)
128 (nix-system->gnu-triplet (%current-system)))))
129 (gcc-configure-flags-for-triplet triplet))
131 (maybe-target-tools))))))
137 (uri (string-append "mirror://gnu/gcc/gcc-"
138 version "/gcc-" version ".tar.bz2"))
141 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
142 (build-system gnu-build-system)
144 ;; Separate out the run-time support libraries because all the
145 ;; dynamic-linked objects depend on it.
146 (outputs '("out" ;commands, etc. (60+ MiB)
147 "lib" ;libgcc_s, libgomp, etc. (15+ MiB)
148 "debug")) ;debug symbols of run-time libraries
150 (inputs `(("gmp" ,gmp)
158 ;; GCC < 5 is one of the few packages that doesn't ship .info files.
159 ;; Newer texinfos fail to build the manual, so we use an older one.
160 (native-inputs `(("texinfo" ,texinfo-5)))
163 `(#:out-of-source? #t
164 #:configure-flags ,(configure-flags)
166 ;; None of the flags below are needed when doing a Canadian cross.
167 ;; TODO: Simplify this.
168 ,(if (%current-target-system)
172 `(let* ((libc (assoc-ref %build-inputs "libc"))
173 (libc-native (or (assoc-ref %build-inputs "libc-native")
176 (list (string-append "LDFLAGS_FOR_TARGET="
178 "-Wl,-dynamic-linker "
180 ,(glibc-dynamic-linker)))
183 ;; Native programs like 'genhooks' also need that right.
184 ,(string-append "LDFLAGS="
185 "-Wl,-rpath=" libc-native "/lib "
186 "-Wl,-dynamic-linker "
187 "-Wl," libc-native ,(glibc-dynamic-linker))
188 ,(string-append "BOOT_CFLAGS=-O2 "
189 ,(if stripped? "-g0" "-g")))))
195 'configure 'pre-configure
196 (lambda* (#:key inputs outputs #:allow-other-keys)
197 (let ((libdir ,(libdir))
198 (libc (assoc-ref inputs "libc")))
200 ;; The following is not performed for `--without-headers'
201 ;; cross-compiler builds.
203 ;; Join multi-line definitions of GLIBC_DYNAMIC_LINKER* into a
204 ;; single line, to allow the next step to work properly.
207 (substitute* (find-files "gcc/config"
208 "^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
209 (("(#define (GLIBC|GNU_USER)_DYNAMIC_LINKER.*)\\\\\n$" _ line)
213 ;; Fix the dynamic linker's file name.
214 (substitute* (find-files "gcc/config"
215 "^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
216 (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ \t]*).*$"
218 (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
220 (string-append libc ,(glibc-dynamic-linker)))))
222 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
223 ;; `crt{begin,end}.o', which come with GCC.
224 (substitute* (find-files "gcc/config"
226 (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix)
227 ;; Help libgcc_s.so be found (see also below.) Always use
228 ;; '-lgcc_s' so that libgcc_s.so is always found by those
229 ;; programs that use 'pthread_cancel' (glibc dlopens
230 ;; libgcc_s.so when pthread_cancel support is needed, but
231 ;; having it in the application's RUNPATH isn't enough; see
232 ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
234 ;; NOTE: The '-lgcc_s' added below needs to be removed in a
235 ;; later phase of %gcc-static. If you change the string
236 ;; below, make sure to update the relevant code in
237 ;; %gcc-static package as needed.
238 (format #f "#define GNU_USER_TARGET_LIB_SPEC \
239 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
240 libc libc libdir suffix))
241 (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
242 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
243 #define STANDARD_STARTFILE_PREFIX_2 \"\"
247 ;; The rs6000 (a.k.a. powerpc) config in GCC does not use
248 ;; GNU_USER_* defines. Do the above for this case.
250 "gcc/config/rs6000/sysv4.h"
251 (("#define LIB_LINUX_SPEC (.*)$" _ suffix)
252 (format #f "#define LIB_LINUX_SPEC \
253 \"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
254 libc libc libdir suffix))
255 (("#define STARTFILE_LINUX_SPEC.*$" line)
256 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
257 #define STANDARD_STARTFILE_PREFIX_2 \"\"
261 ;; Don't retain a dependency on the build-time sed.
262 (substitute* "fixincludes/fixincl.x"
263 (("static char const sed_cmd_z\\[\\] =.*;")
264 "static char const sed_cmd_z[] = \"sed\";"))
266 ;; Aarch64 support didn't land in GCC until the 4.8 series.
267 (when (file-exists? "gcc/config/aarch64")
268 ;; Force Aarch64 libdir to be /lib and not /lib64
269 (substitute* "gcc/config/aarch64/t-aarch64-linux"
272 (when (file-exists? "libbacktrace")
273 ;; GCC 4.8+ comes with libbacktrace. By default it builds
274 ;; with -Werror, which fails with a -Wcast-qual error in glibc
275 ;; 2.21's stdlib-bsearch.h. Remove -Werror.
276 (substitute* "libbacktrace/configure"
277 (("WARN_FLAGS=(.*)-Werror" _ flags)
278 (string-append "WARN_FLAGS=" flags)))
280 (when (file-exists? "libsanitizer/libbacktrace")
281 ;; Same in libsanitizer's bundled copy (!) found in 4.9+.
282 (substitute* "libsanitizer/libbacktrace/Makefile.in"
286 ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s.
287 ;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354>
288 ;; and <http://bugs.gnu.org/20358>.
289 (substitute* "libstdc++-v3/src/Makefile.in"
291 "OPT_LDFLAGS = -Wl,-rpath=$(libdir) "))
293 ;; Move libstdc++*-gdb.py to the "lib" output to avoid a
294 ;; circularity between "out" and "lib". (Note:
295 ;; --with-python-dir is useless because it imposes $(prefix) as
296 ;; the parent directory.)
297 (substitute* "libstdc++-v3/python/Makefile.in"
299 (string-append "pythondir = " libdir "/share"
300 "/gcc-$(gcc_version)/python\n")))
302 ;; Avoid another circularity between the outputs: this #define
303 ;; ends up in auto-host.h in the "lib" output, referring to
304 ;; "out". (This variable is used to augment cpp's search path,
305 ;; but there's nothing useful to look for here.)
306 (substitute* "gcc/config.in"
307 (("PREFIX_INCLUDE_DIR")
308 "PREFIX_INCLUDE_DIR_isnt_necessary_here"))))
311 'configure 'post-configure
313 ;; Don't store configure flags, to avoid retaining references to
314 ;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'.
315 (substitute* "Makefile"
316 (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
317 "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
321 ;; Use the language-specific variables rather than 'CPATH' because they
322 ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
323 ;; The intent is to allow headers that are in the search path to be
324 ;; treated as "system headers" (headers exempt from warnings) just like
325 ;; the typical /usr/include headers on an FHS system.
326 (list (search-path-specification
327 (variable "C_INCLUDE_PATH")
328 (files '("include")))
329 (search-path-specification
330 (variable "CPLUS_INCLUDE_PATH")
331 (files '("include")))
332 (search-path-specification
333 (variable "LIBRARY_PATH")
334 (files '("lib" "lib64")))))
336 (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
337 (synopsis "GNU Compiler Collection")
339 "GCC is the GNU Compiler Collection. It provides compiler front-ends
340 for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and
341 Go. It also includes runtime support libraries for these languages.")
343 (supported-systems (delete "aarch64-linux" %supported-systems))
344 (home-page "https://gcc.gnu.org/"))))
346 (define-public gcc-4.8
347 (package (inherit gcc-4.7)
351 (uri (string-append "mirror://gnu/gcc/gcc-"
352 version "/gcc-" version ".tar.bz2"))
355 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
356 (patches (search-patches "gcc-arm-link-spec-fix.patch"))))
357 (supported-systems %supported-systems)))
359 (define-public gcc-4.9
360 (package (inherit gcc-4.7)
364 (uri (string-append "mirror://gnu/gcc/gcc-"
365 version "/gcc-" version ".tar.bz2"))
368 "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
369 (patches (search-patches "gcc-arm-bug-71399.patch"
370 "gcc-libvtv-runpath.patch"))))
371 (native-inputs `(("texinfo" ,texinfo)))
372 (supported-systems %supported-systems)))
375 ;; Note: GCC >= 5 ships with .info files but 'make install' fails to install
376 ;; them in a VPATH build.
377 (package (inherit gcc-4.9)
381 (uri (string-append "mirror://gnu/gcc/gcc-"
382 version "/gcc-" version ".tar.bz2"))
385 "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"))
386 (patches (search-patches "gcc-arm-bug-71399.patch"
387 "gcc-strmov-store-file-names.patch"
388 "gcc-asan-powerpc-missing-include.patch"
389 "gcc-5.0-libvtv-runpath.patch"
390 "gcc-5-source-date-epoch-1.patch"
391 "gcc-5-source-date-epoch-2.patch"))))))
399 (uri (string-append "mirror://gnu/gcc/gcc-"
400 version "/gcc-" version ".tar.xz"))
403 "1m0lr7938lw5d773dkvwld90hjlcq2282517d1gwvrfzmwgg42w5"))
404 (patches (search-patches "gcc-strmov-store-file-names.patch"
405 "gcc-5.0-libvtv-runpath.patch"))))))
412 (uri (string-append "mirror://gnu/gcc/gcc-"
413 version "/gcc-" version ".tar.xz"))
416 "16j7i0888j2f1yp9l0nhji6cq65dy6y4nwy8868a8njbzzwavxqw"))
417 (patches (search-patches "gcc-strmov-store-file-names.patch"
418 "gcc-5.0-libvtv-runpath.patch"))))))
420 ;; Note: When changing the default gcc version, update
421 ;; the gcc-toolchain-* definitions and the gfortran definition
423 (define-public gcc gcc-5)
425 (define-public (make-libstdc++ gcc)
426 "Return a libstdc++ package based on GCC. The primary use case is when
427 using compilers other than GCC."
432 `(#:out-of-source? #t
433 #:phases (alist-cons-before
436 (chdir "libstdc++-v3"))
438 #:configure-flags `("--disable-libstdcxx-pch"
439 ,(string-append "--with-gxx-include-dir="
440 (assoc-ref %outputs "out")
442 (outputs '("out" "debug"))
445 (propagated-inputs '())
446 (synopsis "GNU C++ standard library")))
448 (define-public libstdc++-4.9
449 (make-libstdc++ gcc-4.9))
451 (define (make-libiberty gcc)
452 "Return a libiberty package based on GCC."
457 `(#:out-of-source? #t
459 (modify-phases %standard-phases
460 (add-before 'configure 'chdir
466 (lambda* (#:key outputs #:allow-other-keys)
467 (let* ((out (assoc-ref outputs "out"))
468 (lib (string-append out "/lib/"))
469 (include (string-append out "/include/")))
472 (copy-file "libiberty.a"
473 (string-append lib "libiberty.a"))
474 (copy-file "../include/libiberty.h"
475 (string-append include "libiberty.h"))
480 (propagated-inputs '())
481 (synopsis "Collection of subroutines used by various GNU programs")))
483 (define-public libiberty
484 (make-libiberty gcc))
486 (define* (custom-gcc gcc name languages
488 (search-paths (package-native-search-paths gcc))
489 #:key (separate-lib-output? #t))
490 "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS
491 as the 'native-search-paths' field."
492 (package (inherit gcc)
494 (outputs (if separate-lib-output?
495 (package-outputs gcc)
496 (delete "lib" (package-outputs gcc))))
497 (native-search-paths search-paths)
499 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
504 ,@(package-arguments gcc))
505 ((#:configure-flags flags)
506 `(cons (string-append "--enable-languages="
507 ,(string-join languages ","))
508 (remove (cut string-match "--enable-languages.*" <>)
511 `(modify-phases ,phases
512 (add-after 'install 'remove-broken-or-conflicting-files
513 (lambda* (#:key outputs #:allow-other-keys)
514 (for-each delete-file
515 (find-files (string-append (assoc-ref outputs "out") "/bin")
516 ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)"))
519 (define %generic-search-paths
520 ;; This is the language-neutral search path for GCC. Entries in $CPATH are
521 ;; not considered "system headers", which means GCC can raise warnings for
522 ;; issues in those headers. 'CPATH' is the only one that works for
523 ;; front-ends not in the C family.
524 (list (search-path-specification
526 (files '("include")))
527 (search-path-specification
528 (variable "LIBRARY_PATH")
529 (files '("lib" "lib64")))))
531 (define-public gfortran-4.8
532 (custom-gcc gcc-4.8 "gfortran" '("fortran")
533 %generic-search-paths))
535 (define-public gfortran-4.9
536 (custom-gcc gcc-4.9 "gfortran" '("fortran")
537 %generic-search-paths))
539 (define-public gfortran-5
540 (custom-gcc gcc-5 "gfortran" '("fortran")
541 %generic-search-paths))
543 (define-public gfortran-6
544 (custom-gcc gcc-6 "gfortran" '("fortran")
545 %generic-search-paths))
547 (define-public gfortran-7
548 (custom-gcc gcc-7 "gfortran" '("fortran")
549 %generic-search-paths))
551 (define-public gfortran
552 ;; Note: Update this when GCC changes! We cannot use
553 ;; (custom-gcc gcc "fortran" …) because that would lead to a package object
554 ;; that is not 'eq?' with GFORTRAN-5, and thus 'fold-packages' would
555 ;; report two gfortran@5 that are in fact identical.
558 (define-public gccgo-4.9
559 (custom-gcc gcc-4.9 "gccgo" '("go")
560 %generic-search-paths
561 ;; Suppress the separate "lib" output, because otherwise the
562 ;; "lib" and "out" outputs would refer to each other, creating
563 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
564 #:separate-lib-output? #f))
566 (define-public gcc-objc-4.8
567 (custom-gcc gcc-4.8 "gcc-objc" '("objc")
568 (list (search-path-specification
569 (variable "OBJC_INCLUDE_PATH")
570 (files '("include")))
571 (search-path-specification
572 (variable "LIBRARY_PATH")
573 (files '("lib" "lib64"))))))
575 (define-public gcc-objc-4.9
576 (custom-gcc gcc-4.9 "gcc-objc" '("objc")
577 (list (search-path-specification
578 (variable "OBJC_INCLUDE_PATH")
579 (files '("include")))
580 (search-path-specification
581 (variable "LIBRARY_PATH")
582 (files '("lib" "lib64"))))))
584 (define-public gcc-objc gcc-objc-4.9)
586 (define-public gcc-objc++-4.8
587 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")
588 (list (search-path-specification
589 (variable "OBJCPLUS_INCLUDE_PATH")
590 (files '("include")))
591 (search-path-specification
592 (variable "LIBRARY_PATH")
593 (files '("lib" "lib64"))))))
595 (define-public gcc-objc++-4.9
596 (custom-gcc gcc-4.9 "gcc-objc++" '("obj-c++")
597 (list (search-path-specification
598 (variable "OBJCPLUS_INCLUDE_PATH")
599 (files '("include")))
600 (search-path-specification
601 (variable "LIBRARY_PATH")
602 (files '("lib" "lib64"))))))
604 (define-public gcc-objc++ gcc-objc++-4.9)
606 (define (make-libstdc++-doc gcc)
607 "Return a package with the libstdc++ documentation for GCC."
610 (name "libstdc++-doc")
611 (version (package-version gcc))
612 (synopsis "GNU libstdc++ documentation")
614 (native-inputs `(("doxygen" ,doxygen)
618 ("docbook-xml" ,docbook-xml)
619 ("docbook-xsl" ,docbook-xsl)
620 ("graphviz" ,graphviz))) ;for 'dot', invoked by 'doxygen'
622 (propagated-inputs '())
624 '(#:out-of-source? #t
625 #:tests? #f ;it's just documentation
626 #:phases (modify-phases %standard-phases
627 (add-before 'configure 'chdir
629 (chdir "libstdc++-v3")))
630 (add-before 'configure 'set-xsl-directory
631 (lambda* (#:key inputs #:allow-other-keys)
632 (let ((docbook (assoc-ref inputs "docbook-xsl")))
633 (substitute* (find-files "doc"
638 (strip-store-file-name docbook)))))))
641 ;; XXX: There's also a 'doc-info' target, but it
642 ;; relies on docbook2X, which itself relies on
643 ;; DocBook 4.1.2, which is not really usable
644 ;; (lacks a catalog.xml.)
645 (zero? (system* "make"
649 (lambda* (#:key outputs #:allow-other-keys)
650 (let ((out (assoc-ref outputs "out")))
651 (zero? (system* "make"
653 "doc-install-man"))))))))))
655 (define-public libstdc++-doc-4.9
656 (make-libstdc++-doc gcc-4.9))
658 (define-public libstdc++-doc-5
659 (make-libstdc++-doc gcc-5))
667 (uri (list (string-append
668 "http://isl.gforge.inria.fr/isl-"
671 (string-append %gcc-infrastructure
672 name "-" version ".tar.gz")))
675 "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))
676 (patches (search-patches "isl-0.11.1-aarch64-support.patch"))))
677 (build-system gnu-build-system)
678 (inputs `(("gmp" ,gmp)))
679 (home-page "http://isl.gforge.inria.fr/")
681 "Manipulating sets and relations of integer points \
682 bounded by linear constraints")
684 "isl is a library for manipulating sets and relations of integer points
685 bounded by linear constraints. Supported operations on sets include
686 intersection, union, set difference, emptiness check, convex hull, (integer)
687 affine hull, integer projection, computing the lexicographic minimum using
688 parametric integer programming, coalescing and parametric vertex
689 enumeration. It also includes an ILP solver based on generalized basis
690 reduction, transitive closures on maps (which may encode infinite graphs),
691 dependence analysis and bounds on piecewise step-polynomials.")
701 (uri (list (string-append
702 "http://www.bastoul.net/cloog/pages/download/count.php3?url=cloog-"
705 (string-append %gcc-infrastructure
706 name "-" version ".tar.gz")))
709 "0a12rwfwp22zd0nlld0xyql11cj390rrq1prw35yjsw8wzfshjhw"))
710 (file-name (string-append name "-" version ".tar.gz"))))
711 (build-system gnu-build-system)
712 (inputs `(("gmp" ,gmp)
714 (arguments '(#:configure-flags '("--with-isl=system")))
715 (home-page "http://www.cloog.org/")
716 (synopsis "Library to generate code for scanning Z-polyhedra")
718 "CLooG is a free software library to generate code for scanning
719 Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that
720 reaches each integral point of one or more parameterized polyhedra.
721 CLooG has been originally written to solve the code generation problem
722 for optimizing compilers based on the polytope model. Nevertheless it
723 is used now in various area e.g., to build control automata for
724 high-level synthesis or to find the best polynomial approximation of a
725 function. CLooG may help in any situation where scanning polyhedra
726 matters. While the user has full control on generated code quality,
727 CLooG is designed to avoid control overhead and to produce a very
731 (define-public gnu-c-manual
733 (name "gnu-c-manual")
737 (uri (string-append "mirror://gnu/gnu-c-manual/gnu-c-manual-"
741 "1sfsj9256w18qzylgag2h5h377aq8in8929svblfnj9svfriqcys"))))
742 (build-system gnu-build-system)
743 (native-inputs `(("texinfo" ,texinfo)))
745 '(#:phases (modify-phases %standard-phases
750 (zero? (system* "make"
752 "gnu-c-manual.html"))))
754 (lambda* (#:key outputs #:allow-other-keys)
755 (let* ((out (assoc-ref outputs "out"))
756 (info (string-append out "/share/info"))
758 out "/share/doc/gnu-c-manual")))
762 (for-each (lambda (file)
764 (string-append info "/"
766 (find-files "." "\\.info(-[0-9])?$"))
767 (for-each (lambda (file)
769 (string-append html "/"
771 (find-files "." "\\.html$"))
773 (synopsis "Reference manual for the C programming language")
775 "This is a reference manual for the C programming language, as
776 implemented by the GNU C Compiler (gcc). As a reference, it is not intended
777 to be a tutorial of the language. Rather, it outlines all of the constructs
778 of the language. Library functions are not included.")
779 (home-page "https://www.gnu.org/software/gnu-c-manual/")