Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
ad7583f6 | 2 | ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> |
c44899a2 | 3 | ;;; |
233e7676 | 4 | ;;; This file is part of GNU Guix. |
c44899a2 | 5 | ;;; |
233e7676 | 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
9 | ;;; your option) any later version. | |
10 | ;;; | |
233e7676 | 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | ;;; GNU General Public License for more details. | |
15 | ;;; | |
16 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 18 | |
1ffa7090 | 19 | (define-module (gnu packages bdw-gc) |
4a44e743 | 20 | #:use-module (guix licenses) |
c44899a2 | 21 | #:use-module (guix packages) |
87f5d366 | 22 | #:use-module (guix download) |
ad7583f6 LC |
23 | #:use-module (guix build-system gnu) |
24 | #:use-module (gnu packages pkg-config)) | |
c44899a2 | 25 | |
bda1bc6c | 26 | (define-public libgc-7.2 |
c44899a2 LC |
27 | (package |
28 | (name "libgc") | |
bfb6b1c7 | 29 | (version "7.2e") |
c44899a2 | 30 | (source (origin |
87f5d366 | 31 | (method url-fetch) |
62b76320 LC |
32 | (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-" |
33 | version ".tar.gz")) | |
c44899a2 LC |
34 | (sha256 |
35 | (base32 | |
bfb6b1c7 | 36 | "0jxgr71rhk58dzc1ihqs51vldh2qs1m154bn41qh6q1dm145nc89")))) |
c44899a2 | 37 | (build-system gnu-build-system) |
4db00e42 LC |
38 | (arguments |
39 | ;; Make it so that we don't rely on /proc. This is especially useful in | |
40 | ;; an initrd run before /proc is mounted. | |
41 | '(#:configure-flags '("CPPFLAGS=-DUSE_LIBC_PRIVATES"))) | |
9bf62d9b | 42 | (outputs '("out" "debug")) |
c44899a2 LC |
43 | (synopsis "The Boehm-Demers-Weiser conservative garbage collector |
44 | for C and C++") | |
45 | (description | |
46 | "The Boehm-Demers-Weiser conservative garbage collector can be used | |
47 | as a garbage collecting replacement for C malloc or C++ new. It allows | |
48 | you to allocate memory basically as you normally would, without | |
49 | explicitly deallocating memory that is no longer useful. The collector | |
50 | automatically recycles memory when it determines that it can no longer | |
51 | be otherwise accessed. | |
52 | ||
53 | The collector is also used by a number of programming language | |
54 | implementations that either use C as intermediate code, want to | |
55 | facilitate easier interoperation with C libraries, or just prefer the | |
56 | simple collector interface. | |
57 | ||
58 | Alternatively, the garbage collector may be used as a leak detector for | |
59 | C or C++ programs, though that is not its primary goal.") | |
62b76320 | 60 | (home-page "http://www.hboehm.info/gc/") |
c44899a2 | 61 | |
62b76320 | 62 | (license (x11-style (string-append home-page "license.txt"))))) |
ad7583f6 LC |
63 | |
64 | (define-public libatomic-ops | |
65 | (package | |
66 | (name "libatomic-ops") | |
67 | (version "7.4.0") | |
68 | (source (origin | |
69 | (method url-fetch) | |
70 | (uri (string-append | |
62b76320 | 71 | "http://www.hboehm.info/gc/gc_source/libatomic_ops-" |
ad7583f6 LC |
72 | version ".tar.gz")) |
73 | (sha256 | |
74 | (base32 | |
75 | "0njv3n63zw6v45k68z6dz14g2hpk5p230ncwmdfkglsljb1cqx98")))) | |
76 | (build-system gnu-build-system) | |
77 | (outputs '("out" "debug")) | |
78 | (synopsis "Accessing hardware atomic memory update operations") | |
79 | (description | |
80 | "This C library provides semi-portable access to hardware-provided atomic | |
81 | memory update operations on a number architectures. These might allow you to | |
82 | write code that does more interesting things in signal handlers, write | |
83 | lock-free code, experiment with thread programming paradigms, etc.") | |
62b76320 | 84 | (home-page "https://github.com/ivmai/libatomic_ops/") |
ad7583f6 LC |
85 | |
86 | ;; Some source files are X11-style, others are GPLv2+. | |
87 | (license gpl2+))) | |
88 | ||
bda1bc6c LC |
89 | (define-public libgc |
90 | (package (inherit libgc-7.2) | |
ad7583f6 LC |
91 | (version "7.4.0") |
92 | (source (origin | |
93 | (method url-fetch) | |
62b76320 LC |
94 | (uri (string-append "http://www.hboehm.info/gc/gc_source/gc-" |
95 | version ".tar.gz")) | |
ad7583f6 LC |
96 | (sha256 |
97 | (base32 | |
98 | "10z2nph62ilab063wygg2lv0jxlsbcf2az9w1lx01jzqj5lzry31")))) | |
99 | ||
100 | ;; New dependencies. | |
101 | (native-inputs `(("pkg-config" ,pkg-config))) | |
102 | (inputs `(("libatomic-ops" ,libatomic-ops))) | |
103 | ||
104 | ;; 'USE_LIBC_PRIVATES' is now the default. | |
105 | (arguments '()))) |