doc: Add quote about running a monadic value.
[jackhill/guix/guix.git] / gnu / packages / gcc.scm
CommitLineData
e9c0b944 1;;; GNU Guix --- Functional package management for GNU
61af1014 2;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
270b501e 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
e2808a4a 4;;; Copyright © 2014 Ricardo Wurmus <rekado@elephly.net>
ed2b1c4f 5;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
e9c0b944
LC
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages gcc)
c6d7e299
LC
23 #:use-module ((guix licenses)
24 #:select (gpl3+ gpl2+ lgpl2.1+ lgpl2.0+))
e9c0b944
LC
25 #:use-module (gnu packages)
26 #:use-module (gnu packages bootstrap)
27 #:use-module (gnu packages compression)
28 #:use-module (gnu packages multiprecision)
c8ebc821 29 #:use-module (gnu packages texinfo)
3e778ad3 30 #:use-module (gnu packages elf)
38cf2ba0 31 #:use-module (gnu packages perl)
e9c0b944
LC
32 #:use-module (guix packages)
33 #:use-module (guix download)
ca16cb96 34 #:use-module (guix build-system gnu)
74574fd1 35 #:use-module (guix build-system trivial)
fdd6c726 36 #:use-module (guix utils)
ca16cb96 37 #:use-module (ice-9 regex))
e9c0b944 38
832abc76
LC
39(define %gcc-infrastructure
40 ;; Base URL for GCC's infrastructure.
41 "ftp://gcc.gnu.org/pub/gcc/infrastructure/")
42
76e639a0 43(define (gcc-configure-flags-for-triplet target)
ca16cb96
LC
44 "Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
45
46The purpose of this procedure is to translate extended GNU triplets---e.g.,
47where the OS part is overloaded to denote a specific ABI---into GCC
48`configure' options. We take extended GNU triplets that glibc recognizes."
49 (cond ((string-match "^mips64el.*gnuabin?64$" target)
50 ;; Triplets recognized by glibc as denoting the N64 ABI; see
51 ;; ports/sysdeps/mips/preconfigure.
52 '("--with-abi=64"))
3f00ff8b
MW
53
54 ((string-match "^arm.*-gnueabihf$" target)
55 '("--with-arch=armv7-a"
56 "--with-float=hard"
57 "--with-mode=thumb"
58
59 ;; See <https://wiki.debian.org/ArmHardFloatPort/VfpComparison#FPU>
60 "--with-fpu=vfpv3-d16"))
61
ca16cb96 62 (else
3f00ff8b 63 ;; TODO: Add `arm.*-gnueabi', etc.
ca16cb96
LC
64 '())))
65
e9c0b944 66(define-public gcc-4.7
9063ef0f 67 (let* ((stripped? #t) ;whether to strip the compiler, not the libraries
de1d41f9
LC
68 (maybe-target-tools
69 (lambda ()
70 ;; Return the `_FOR_TARGET' variables that are needed when
71 ;; cross-compiling GCC.
72 (let ((target (%current-target-system)))
73 (if target
74 (map (lambda (var tool)
75 (string-append (string-append var "_FOR_TARGET")
76 "=" target "-" tool))
77 '("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
78 '("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
79 '()))))
7e3c9f74
LC
80 (libdir
81 (let ((base '(or (assoc-ref outputs "lib")
82 (assoc-ref outputs "out"))))
83 (lambda ()
84 ;; Return the directory that contains lib/libgcc_s.so et al.
85 (if (%current-target-system)
86 `(string-append ,base "/" ,(%current-target-system))
87 base))))
de1d41f9
LC
88 (configure-flags
89 (lambda ()
90 ;; This is terrible. Since we have two levels of quasiquotation,
91 ;; we have to do this convoluted thing just so we can insert the
92 ;; contents of (maybe-target-tools).
93 (list 'quasiquote
94 (append
95 '("--enable-plugin"
96 "--enable-languages=c,c++"
97 "--disable-multilib"
98
06213498
LC
99 ;; No pre-compiled libstdc++ headers, to save space.
100 "--disable-libstdcxx-pch"
101
de1d41f9
LC
102 "--with-local-prefix=/no-gcc-local-prefix"
103
84e6756c
LC
104 ;; With a separate "lib" output, the build system
105 ;; incorrectly guesses GPLUSPLUS_INCLUDE_DIR, so force
106 ;; it. (Don't use a versioned sub-directory, that's
107 ;; unnecessary.)
108 ,(string-append "--with-gxx-include-dir="
109 (assoc-ref %outputs "out")
110 "/include/c++")
111
de1d41f9
LC
112 ,(let ((libc (assoc-ref %build-inputs "libc")))
113 (if libc
114 (string-append "--with-native-system-header-dir=" libc
115 "/include")
116 "--without-headers")))
117
76e639a0
MW
118 ;; Pass the right options for the target triplet.
119 (let ((triplet
120 (or (%current-target-system)
121 (nix-system->gnu-triplet (%current-system)))))
122 (gcc-configure-flags-for-triplet triplet))
ca16cb96 123
de1d41f9 124 (maybe-target-tools))))))
e9c0b944 125 (package
de1d41f9 126 (name "gcc")
d2e2f142 127 (version "4.7.4")
de1d41f9
LC
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://gnu/gcc/gcc-"
131 version "/gcc-" version ".tar.bz2"))
132 (sha256
133 (base32
d2e2f142 134 "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
de1d41f9 135 (build-system gnu-build-system)
84e6756c
LC
136
137 ;; Separate out the run-time support libraries because all the
138 ;; dynamic-linked objects depend on it.
9063ef0f
LC
139 (outputs '("out" ;commands, etc. (60+ MiB)
140 "lib" ;libgcc_s, libgomp, etc. (15+ MiB)
141 "debug")) ;debug symbols of run-time libraries
84e6756c 142
de1d41f9
LC
143 (inputs `(("gmp" ,gmp)
144 ("mpfr" ,mpfr)
145 ("mpc" ,mpc)
146 ("isl" ,isl)
147 ("cloog" ,cloog)
148 ("libelf" ,libelf)
149 ("zlib" ,zlib)))
c8ebc821
LC
150
151 ;; GCC is one of the few packages that doesn't ship .info files.
152 (native-inputs `(("texinfo" ,texinfo)))
153
de1d41f9
LC
154 (arguments
155 `(#:out-of-source? #t
de1d41f9
LC
156 #:configure-flags ,(configure-flags)
157 #:make-flags
fd0b2766
LC
158 ;; None of the flags below are needed when doing a Canadian cross.
159 ;; TODO: Simplify this.
160 ,(if (%current-target-system)
161 (if stripped?
162 ''("CFLAGS=-g0 -O2")
163 ''())
164 `(let* ((libc (assoc-ref %build-inputs "libc"))
165 (libc-native (or (assoc-ref %build-inputs "libc-native")
166 libc)))
167 `(,@(if libc
168 (list (string-append "LDFLAGS_FOR_TARGET="
169 "-B" libc "/lib "
170 "-Wl,-dynamic-linker "
171 "-Wl," libc
172 ,(glibc-dynamic-linker)))
173 '())
174
175 ;; Native programs like 'genhooks' also need that right.
176 ,(string-append "LDFLAGS="
177 "-Wl,-rpath=" libc-native "/lib "
178 "-Wl,-dynamic-linker "
179 "-Wl," libc-native ,(glibc-dynamic-linker))
180 ,(string-append "BOOT_CFLAGS=-O2 "
181 ,(if stripped? "-g0" "-g")))))
de1d41f9
LC
182
183 #:tests? #f
dfc8bb20 184
de1d41f9
LC
185 #:phases
186 (alist-cons-before
187 'configure 'pre-configure
188 (lambda* (#:key inputs outputs #:allow-other-keys)
7e3c9f74 189 (let ((libdir ,(libdir))
84e6756c 190 (libc (assoc-ref inputs "libc")))
de1d41f9
LC
191 (when libc
192 ;; The following is not performed for `--without-headers'
193 ;; cross-compiler builds.
194
91c47bef
MW
195 ;; Join multi-line definitions of GLIBC_DYNAMIC_LINKER* into a
196 ;; single line, to allow the next step to work properly.
197 (for-each
198 (lambda (x)
199 (substitute* (find-files "gcc/config"
3f00ff8b 200 "^linux(64|-elf|-eabi)?\\.h$")
91c47bef
MW
201 (("(#define GLIBC_DYNAMIC_LINKER.*)\\\\\n$" _ line)
202 line)))
203 '(1 2 3))
204
de1d41f9
LC
205 ;; Fix the dynamic linker's file name.
206 (substitute* (find-files "gcc/config"
3f00ff8b 207 "^linux(64|-elf|-eabi)?\\.h$")
de1d41f9
LC
208 (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
209 (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
210 suffix
211 (string-append libc ,(glibc-dynamic-linker)))))
212
213 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
214 ;; `crt{begin,end}.o', which come with GCC.
215 (substitute* (find-files "gcc/config"
06213498
LC
216 "^gnu-user.*\\.h$")
217 (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix)
fa1e2f3d
MW
218 ;; Help libgcc_s.so be found (see also below.) Always use
219 ;; '-lgcc_s' so that libgcc_s.so is always found by those
220 ;; programs that use 'pthread_cancel' (glibc dlopens
221 ;; libgcc_s.so when pthread_cancel support is needed, but
222 ;; having it in the application's RUNPATH isn't enough; see
a7bf595f 223 ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
270b501e
MW
224 ;;
225 ;; NOTE: The '-lgcc_s' added below needs to be removed in a
226 ;; later phase of %gcc-static. If you change the string
227 ;; below, make sure to update the relevant code in
228 ;; %gcc-static package as needed.
06213498 229 (format #f "#define GNU_USER_TARGET_LIB_SPEC \
81197492
LC
230\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib -lgcc_s}} \" ~a"
231 libc libc libdir suffix))
06213498 232 (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
de1d41f9 233 (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
e9c0b944 234#define STANDARD_STARTFILE_PREFIX_2 \"\"
06213498 235~a"
de1d41f9
LC
236 libc line))))
237
238 ;; Don't retain a dependency on the build-time sed.
239 (substitute* "fixincludes/fixincl.x"
240 (("static char const sed_cmd_z\\[\\] =.*;")
84e6756c
LC
241 "static char const sed_cmd_z[] = \"sed\";"))
242
d0b62698
LC
243 (when (file-exists? "libbacktrace")
244 ;; GCC 4.8+ comes with libbacktrace. By default it builds
245 ;; with -Werror, which fails with a -Wcast-qual error in glibc
246 ;; 2.21's stdlib-bsearch.h. Remove -Werror.
247 (substitute* "libbacktrace/configure"
248 (("WARN_FLAGS=(.*)-Werror" _ flags)
ec299071
LC
249 (string-append "WARN_FLAGS=" flags)))
250
251 (when (file-exists? "libsanitizer/libbacktrace")
252 ;; Same in libsanitizer's bundled copy (!) found in 4.9+.
253 (substitute* "libsanitizer/libbacktrace/Makefile.in"
254 (("-Werror")
255 ""))))
d0b62698 256
21e583de
LC
257 ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s.
258 ;; See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32354>
259 ;; and <http://bugs.gnu.org/20358>.
260 (substitute* "libstdc++-v3/src/Makefile.in"
261 (("^OPT_LDFLAGS = ")
262 "OPT_LDFLAGS = -Wl,-rpath=$(libdir) "))
263
84e6756c
LC
264 ;; Move libstdc++*-gdb.py to the "lib" output to avoid a
265 ;; circularity between "out" and "lib". (Note:
266 ;; --with-python-dir is useless because it imposes $(prefix) as
267 ;; the parent directory.)
268 (substitute* "libstdc++-v3/python/Makefile.in"
269 (("pythondir = .*$")
270 (string-append "pythondir = " libdir "/share"
271 "/gcc-$(gcc_version)/python\n")))
272
273 ;; Avoid another circularity between the outputs: this #define
274 ;; ends up in auto-host.h in the "lib" output, referring to
275 ;; "out". (This variable is used to augment cpp's search path,
276 ;; but there's nothing useful to look for here.)
277 (substitute* "gcc/config.in"
278 (("PREFIX_INCLUDE_DIR")
279 "PREFIX_INCLUDE_DIR_isnt_necessary_here"))))
de1d41f9
LC
280
281 (alist-cons-after
282 'configure 'post-configure
283 (lambda _
284 ;; Don't store configure flags, to avoid retaining references to
6f58d582 285 ;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'.
de1d41f9
LC
286 (substitute* "Makefile"
287 (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest)
288 "TOPLEVEL_CONFIGURE_ARGUMENTS=\n")))
9063ef0f 289 %standard-phases))))
de1d41f9
LC
290
291 (native-search-paths
292 (list (search-path-specification
293 (variable "CPATH")
af070955 294 (files '("include")))
de1d41f9
LC
295 (search-path-specification
296 (variable "LIBRARY_PATH")
af070955 297 (files '("lib" "lib64")))))
de1d41f9
LC
298
299 (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
300 (synopsis "GNU Compiler Collection")
301 (description
a22dc0c4
LC
302 "GCC is the GNU Compiler Collection. It provides compiler front-ends
303for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and
79c311b8 304Go. It also includes runtime support libraries for these languages.")
de1d41f9
LC
305 (license gpl3+)
306 (home-page "http://gcc.gnu.org/"))))
832abc76 307
3b401612 308(define-public gcc-4.8
3b401612 309 (package (inherit gcc-4.7)
0d12bc74 310 (version "4.8.4")
3b401612 311 (source (origin
7e35b9dd
LC
312 (method url-fetch)
313 (uri (string-append "mirror://gnu/gcc/gcc-"
314 version "/gcc-" version ".tar.bz2"))
315 (sha256
316 (base32
317 "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a"))
318 (patches (list (search-patch "gcc-arm-link-spec-fix.patch")))))))
3b401612 319
571aa6cd 320(define-public gcc-4.9
7e35b9dd 321 (package (inherit gcc-4.8)
3b1bba4c 322 (version "4.9.2")
571aa6cd 323 (source (origin
7e35b9dd
LC
324 (method url-fetch)
325 (uri (string-append "mirror://gnu/gcc/gcc-"
326 version "/gcc-" version ".tar.bz2"))
327 (sha256
328 (base32
329 "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810"))
330 (patches (map search-patch
331 '("gcc-arm-link-spec-fix.patch"
332 "gcc-libvtv-runpath.patch")))))))
571aa6cd 333
60e2d5fe 334(define-public gcc-5.1
7e35b9dd 335 (package (inherit gcc-4.9)
60e2d5fe
MW
336 (version "5.1.0")
337 (source (origin
7e35b9dd
LC
338 (method url-fetch)
339 (uri (string-append "mirror://gnu/gcc/gcc-"
340 version "/gcc-" version ".tar.bz2"))
341 (sha256
342 (base32
343 "1bd5vj4px3s8nlakbgrh38ynxq4s654m6nxz7lrj03mvkkwgvnmp"))
167a05aa
LC
344 (patches (map search-patch
345 '("gcc-arm-link-spec-fix.patch"
346 "gcc-5.0-libvtv-runpath.patch")))))))
60e2d5fe 347
eed67cbb
RW
348(define-public gcc gcc-4.9)
349
d0abf829
LC
350(define-public (make-libstdc++ gcc)
351 "Return a libstdc++ package based on GCC. The primary use case is when
352using compilers other than GCC."
353 (package
354 (inherit gcc)
355 (name "libstdc++")
356 (arguments
357 `(#:out-of-source? #t
358 #:phases (alist-cons-before
359 'configure 'chdir
360 (lambda _
361 (chdir "libstdc++-v3"))
362 %standard-phases)
363 #:configure-flags `("--disable-libstdcxx-pch"
364 ,(string-append "--with-gxx-include-dir="
365 (assoc-ref %outputs "out")
366 "/include"))))
367 (outputs '("out" "debug"))
368 (inputs '())
369 (native-inputs '())
370 (propagated-inputs '())
371 (synopsis "GNU C++ standard library")))
372
373(define-public libstdc++-4.9
374 (make-libstdc++ gcc-4.9))
375
c4df90a5 376(define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
fdd6c726
NK
377 "Return a custom version of GCC that supports LANGUAGES."
378 (package (inherit gcc)
379 (name name)
c4df90a5
MW
380 (outputs (if separate-lib-output?
381 (package-outputs gcc)
382 (delete "lib" (package-outputs gcc))))
fdd6c726
NK
383 (arguments
384 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
385 (guix build utils)
386 (ice-9 regex)
387 (srfi srfi-1)
388 (srfi srfi-26))
389 ,@(package-arguments gcc))
390 ((#:configure-flags flags)
391 `(cons (string-append "--enable-languages="
392 ,(string-join languages ","))
393 (remove (cut string-match "--enable-languages.*" <>)
394 ,flags)))))))
395
396(define-public gfortran-4.8
397 (custom-gcc gcc-4.8 "gfortran" '("fortran")))
398
c69a8b7b
RW
399(define-public gfortran-4.9
400 (custom-gcc gcc-4.9 "gfortran" '("fortran")))
401
eed67cbb
RW
402(define-public gfortran
403 (custom-gcc gcc "gfortran" '("fortran")))
404
fdd6c726 405(define-public gccgo-4.8
c4df90a5
MW
406 (custom-gcc gcc-4.8 "gccgo" '("go")
407 ;; Suppress the separate "lib" output, because otherwise the
408 ;; "lib" and "out" outputs would refer to each other, creating
409 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
410 #:separate-lib-output? #f))
fdd6c726 411
ed2b1c4f
AE
412(define javac.in
413 (origin
414 (method url-fetch)
415 (uri (string-append "http://sources.gentoo.org/cgi-bin/viewvc.cgi/"
61af1014
LC
416 "gentoo-x86/dev-java/gcj-jdk/files/javac.in?revision=1.1"))
417 (file-name "javac.in")
ed2b1c4f
AE
418 (sha256 (base32
419 "1c3dk4z5yfj6ic2fn3lyxs27n6pmn2wy9k0r1s17lnkf1bzkrciv"))))
420
74574fd1
RW
421(define-public gcj-4.8
422 (package (inherit gcc-4.8)
423 (name "gcj")
424 (inputs
425 `(("fastjar" ,fastjar)
426 ("perl" ,perl)
ed2b1c4f 427 ("javac.in" ,javac.in)
74574fd1
RW
428 ("ecj-bootstrap" ,ecj-bootstrap-4.8)
429 ,@(package-inputs gcc-4.8)))
430 ;; Suppress the separate "lib" output, because otherwise the
431 ;; "lib" and "out" outputs would refer to each other, creating
432 ;; a cyclic dependency. <http://debbugs.gnu.org/18101>
433 (outputs
434 (delete "lib" (package-outputs gcc-4.8)))
435 (arguments
436 (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system)
437 (guix build utils)
438 (ice-9 regex)
439 (srfi srfi-1)
440 (srfi srfi-26))
441 ,@(package-arguments gcc-4.8))
442 ((#:configure-flags flags)
443 `(let ((ecj (assoc-ref %build-inputs "ecj-bootstrap")))
444 `("--enable-java-home"
445 "--enable-gjdoc"
446 ,(string-append "--with-ecj-jar=" ecj)
447 "--enable-languages=java"
448 ,@(remove (cut string-match "--enable-languages.*" <>)
449 ,flags))))
ad12c43e
RW
450 ((#:phases phases)
451 `(modify-phases ,phases
452 (add-after
453 'unpack 'add-lib-output-to-rpath
454 (lambda _
455 (substitute* "libjava/Makefile.in"
456 (("libgcj_bc_dummy_LINK = .* -shared" line)
457 (string-append line " -Wl,-rpath=$(libdir)"))
458 (("libgcj(_bc)?_la_LDFLAGS =" ldflags _)
459 (string-append ldflags " -Wl,-rpath=$(libdir)")))))
460 (add-after
461 'install 'install-javac-and-javap-wrappers
462 (lambda _
463 (let* ((javac (assoc-ref %build-inputs "javac.in"))
464 (ecj (assoc-ref %build-inputs "ecj-bootstrap"))
465 (gcj (assoc-ref %outputs "out"))
466 (gcjbin (string-append gcj "/bin/"))
467 (jvm (string-append gcj "/lib/jvm/"))
468 (target (string-append jvm "/bin/javac")))
469
470 (symlink (string-append gcjbin "jcf-dump")
471 (string-append jvm "/bin/javap"))
472
473 (copy-file ecj (string-append gcj "/share/java/ecj.jar"))
474
475 ;; Create javac wrapper from the template javac.in by
476 ;; replacing the @VARIABLES@ with paths.
477 (copy-file javac target)
478 (patch-shebang target)
479 (substitute* target
480 (("@JAVA@")
481 (string-append jvm "/bin/java"))
482 (("@ECJ_JAR@")
483 (string-append gcj "/share/java/ecj.jar"))
484 (("@RT_JAR@")
485 (string-append jvm "/jre/lib/rt.jar"))
486 (("@TOOLS_JAR@")
487 (string-append jvm "/lib/tools.jar")))
488 (chmod target #o755)
489 #t)))
490 (add-after
5f6887e8
RW
491 'install 'remove-broken-or-conflicting-files
492 (lambda _
493 (let ((out (assoc-ref %outputs "out")))
494 (for-each
495 delete-file
496 (append (find-files (string-append out "/lib/jvm/jre/lib")
497 "libjawt.so")
498 (find-files (string-append out "/bin")
499 ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)"))))
ad12c43e 500 #t))))))))
74574fd1
RW
501
502(define ecj-bootstrap-4.8
503 (origin
504 (method url-fetch)
505 (uri "ftp://sourceware.org/pub/java/ecj-4.8.jar")
506 (sha256
507 (base32
508 "10fpqfbdzff1zcbxzh66xc8xbij9saykcj4xzm19wk9p3n7i5zcq"))))
509
fdd6c726
NK
510(define-public gcc-objc-4.8
511 (custom-gcc gcc-4.8 "gcc-objc" '("objc")))
512
513(define-public gcc-objc++-4.8
514 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++")))
515
832abc76
LC
516(define-public isl
517 (package
518 (name "isl")
519 (version "0.11.1")
520 (source (origin
521 (method url-fetch)
522 (uri (list (string-append
590a4904 523 "http://isl.gforge.inria.fr/isl-"
832abc76
LC
524 version
525 ".tar.bz2")
526 (string-append %gcc-infrastructure
527 name "-" version ".tar.gz")))
528 (sha256
529 (base32
530 "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"))))
531 (build-system gnu-build-system)
532 (inputs `(("gmp" ,gmp)))
590a4904 533 (home-page "http://isl.gforge.inria.fr/")
832abc76 534 (synopsis
9e771e3b
LC
535 "Manipulating sets and relations of integer points \
536bounded by linear constraints")
832abc76
LC
537 (description
538 "isl is a library for manipulating sets and relations of integer points
35b9e423 539bounded by linear constraints. Supported operations on sets include
832abc76
LC
540intersection, union, set difference, emptiness check, convex hull, (integer)
541affine hull, integer projection, computing the lexicographic minimum using
542parametric integer programming, coalescing and parametric vertex
35b9e423 543enumeration. It also includes an ILP solver based on generalized basis
832abc76
LC
544reduction, transitive closures on maps (which may encode infinite graphs),
545dependence analysis and bounds on piecewise step-polynomials.")
546 (license lgpl2.1+)))
547
548(define-public cloog
549 (package
550 (name "cloog")
551 (version "0.18.0")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (list (string-append
556 "http://www.bastoul.net/cloog/pages/download/count.php3?url=cloog-"
557 version
558 ".tar.gz")
559 (string-append %gcc-infrastructure
560 name "-" version ".tar.gz")))
561 (sha256
562 (base32
563 "0a12rwfwp22zd0nlld0xyql11cj390rrq1prw35yjsw8wzfshjhw"))
564 (file-name (string-append name "-" version ".tar.gz"))))
565 (build-system gnu-build-system)
566 (inputs `(("gmp" ,gmp)
567 ("isl" ,isl)))
568 (arguments '(#:configure-flags '("--with-isl=system")))
569 (home-page "http://www.cloog.org/")
9e771e3b 570 (synopsis "Library to generate code for scanning Z-polyhedra")
832abc76
LC
571 (description
572 "CLooG is a free software library to generate code for scanning
573Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that
574reaches each integral point of one or more parameterized polyhedra.
575CLooG has been originally written to solve the code generation problem
576for optimizing compilers based on the polytope model. Nevertheless it
577is used now in various area e.g., to build control automata for
578high-level synthesis or to find the best polynomial approximation of a
579function. CLooG may help in any situation where scanning polyhedra
580matters. While the user has full control on generated code quality,
581CLooG is designed to avoid control overhead and to produce a very
582effective code.")
583 (license gpl2+)))
5c126b64 584