Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
4cb87d63 | 2 | ;;; Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
8174e9b7 | 3 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
58f58cb4 | 4 | ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name> |
ed788c31 | 5 | ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> |
c44899a2 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
c44899a2 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
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 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
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 | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages bdw-gc) |
4a44e743 | 23 | #:use-module (guix licenses) |
c44899a2 | 24 | #:use-module (guix packages) |
87f5d366 | 25 | #:use-module (guix download) |
ad7583f6 | 26 | #:use-module (guix build-system gnu) |
ed788c31 RS |
27 | #:use-module (gnu packages pkg-config) |
28 | #:use-module (gnu packages hurd)) | |
c44899a2 | 29 | |
c8d1e7a1 | 30 | (define-public libgc |
c44899a2 LC |
31 | (package |
32 | (name "libgc") | |
1d3de979 | 33 | (version "7.6.6") |
c44899a2 | 34 | (source (origin |
87f5d366 | 35 | (method url-fetch) |
1d3de979 MB |
36 | (uri (string-append "https://github.com/ivmai/bdwgc/releases" |
37 | "/download/v" version "/gc-" version ".tar.gz")) | |
c44899a2 LC |
38 | (sha256 |
39 | (base32 | |
1d3de979 | 40 | "1p1r015a7jbpvkkbgzv1y8nxrbbp6dg0mq3ksi6ji0qdz3wfss79")))) |
c44899a2 | 41 | (build-system gnu-build-system) |
4db00e42 | 42 | (arguments |
ed788c31 RS |
43 | `(#:configure-flags |
44 | (list | |
45 | ;; Install gc_cpp.h et al. | |
46 | "--enable-cplusplus" | |
47 | ;; In GNU/Hurd systems during the 'Check' phase, | |
48 | ;; there is a deadlock caused by the 'gctest' test. | |
49 | ;; To disable the error set "--disable-gcj-support" | |
50 | ;; to configure script. See bug report and discussion: | |
51 | ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html> | |
52 | ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html> | |
53 | ,@(if (hurd-triplet? (or (%current-system) | |
54 | (%current-target-system))) | |
55 | '("--disable-gcj-support") | |
56 | '())))) | |
c8d1e7a1 LF |
57 | (native-inputs `(("pkg-config" ,pkg-config))) |
58 | (inputs `(("libatomic-ops" ,libatomic-ops))) | |
9bf62d9b | 59 | (outputs '("out" "debug")) |
c44899a2 LC |
60 | (synopsis "The Boehm-Demers-Weiser conservative garbage collector |
61 | for C and C++") | |
62 | (description | |
63 | "The Boehm-Demers-Weiser conservative garbage collector can be used | |
64 | as a garbage collecting replacement for C malloc or C++ new. It allows | |
65 | you to allocate memory basically as you normally would, without | |
66 | explicitly deallocating memory that is no longer useful. The collector | |
67 | automatically recycles memory when it determines that it can no longer | |
68 | be otherwise accessed. | |
69 | ||
70 | The collector is also used by a number of programming language | |
71 | implementations that either use C as intermediate code, want to | |
72 | facilitate easier interoperation with C libraries, or just prefer the | |
73 | simple collector interface. | |
74 | ||
75 | Alternatively, the garbage collector may be used as a leak detector for | |
76 | C or C++ programs, though that is not its primary goal.") | |
62b76320 | 77 | (home-page "http://www.hboehm.info/gc/") |
c44899a2 | 78 | |
62b76320 | 79 | (license (x11-style (string-append home-page "license.txt"))))) |
ad7583f6 | 80 | |
4cb87d63 LC |
81 | (define-public libgc/back-pointers |
82 | (package | |
83 | (inherit libgc) | |
84 | (name "libgc-back-pointers") | |
85 | (arguments | |
86 | `(#:make-flags | |
87 | (list "CPPFLAGS=-DKEEP_BACK_PTRS=1") | |
88 | ,@(package-arguments libgc))) | |
89 | (synopsis "The BDW garbage collector, with back-pointer tracking"))) | |
90 | ||
ad7583f6 LC |
91 | (define-public libatomic-ops |
92 | (package | |
93 | (name "libatomic-ops") | |
e63199ec | 94 | (version "7.6.6") |
ad7583f6 LC |
95 | (source (origin |
96 | (method url-fetch) | |
97 | (uri (string-append | |
1be8a432 MB |
98 | "https://github.com/ivmai/libatomic_ops/releases/download/v" |
99 | version "/libatomic_ops-" version ".tar.gz")) | |
ad7583f6 LC |
100 | (sha256 |
101 | (base32 | |
e63199ec | 102 | "0x7071z707msvyrv9dmgahd1sghbkw8fpbagvcag6xs8yp2spzlr")))) |
ad7583f6 LC |
103 | (build-system gnu-build-system) |
104 | (outputs '("out" "debug")) | |
105 | (synopsis "Accessing hardware atomic memory update operations") | |
106 | (description | |
107 | "This C library provides semi-portable access to hardware-provided atomic | |
7b8acffd | 108 | memory update operations on a number of architectures. These might allow you to |
ad7583f6 LC |
109 | write code that does more interesting things in signal handlers, write |
110 | lock-free code, experiment with thread programming paradigms, etc.") | |
62b76320 | 111 | (home-page "https://github.com/ivmai/libatomic_ops/") |
ad7583f6 LC |
112 | |
113 | ;; Some source files are X11-style, others are GPLv2+. | |
114 | (license gpl2+))) |