gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / bdw-gc.scm
index a5130f5..50e4951 100644 (file)
@@ -1,8 +1,9 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2016, 2017, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,6 +24,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages hurd))
 (define-public libgc
   (package
    (name "libgc")
-   (version "7.6.8")
+   (version "8.0.4")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://github.com/ivmai/bdwgc/releases"
                                 "/download/v" version "/gc-" version ".tar.gz"))
             (sha256
              (base32
-              "0n720a0i584ghcwmdsjiq6bl9ig0p9mrja29rp4cgsqvpz6wa2h4"))))
+              "1798rp3mcfkgs38ynkbg2p47bq59pisrc6mn0l20pb5iczf0ssj3"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
              '("--disable-gcj-support")
              '()))))
    (native-inputs `(("pkg-config" ,pkg-config)))
-   (inputs `(("libatomic-ops" ,libatomic-ops)))
+   (propagated-inputs
+    (if (%current-target-system)
+        ;; The build system refuses to check for compiler intrinsics when
+        ;; cross-compiling, and demands using libatomic-ops instead.
+        `(("libatomic-ops" ,libatomic-ops))
+        '()))
    (outputs '("out" "debug"))
    (synopsis "The Boehm-Demers-Weiser conservative garbage collector
 for C and C++")
@@ -74,13 +81,35 @@ simple collector interface.
 
 Alternatively, the garbage collector may be used as a leak detector for
 C or C++ programs, though that is not its primary goal.")
-   (home-page "http://www.hboehm.info/gc/")
+   (home-page "https://www.hboehm.info/gc/")
 
    (license (x11-style (string-append home-page "license.txt")))))
 
-(define-public libgc/back-pointers
+;; TODO: Add a static output in libgc in the next rebuild cycle.
+(define-public libgc/static-libs
+  (package/inherit
+   libgc
+   (arguments (substitute-keyword-arguments (package-arguments libgc)
+                ((#:configure-flags flags ''())
+                 `(cons "--enable-static" ,flags))))
+   (properties '((hidden? . #t)))))
+
+(define-public libgc-7
   (package
-    (inherit libgc)
+   (inherit libgc)
+   (version "7.6.12")
+   (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/ivmai/bdwgc/releases"
+                                 "/download/v" version "/gc-" version ".tar.gz"))
+             (sha256
+              (base32
+               "10jhhi79d5brwlsyhwgpnrmc8nhlf7aan2lk9xhgihk5jc6srbvc"))))
+   (propagated-inputs `(("libatomic-ops" ,libatomic-ops)))))
+
+(define-public libgc/back-pointers
+  (package/inherit
+    libgc
     (name "libgc-back-pointers")
     (arguments
      `(#:make-flags
@@ -91,7 +120,7 @@ C or C++ programs, though that is not its primary goal.")
 (define-public libatomic-ops
   (package
     (name "libatomic-ops")
-    (version "7.6.6")
+    (version "7.6.10")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -99,7 +128,7 @@ C or C++ programs, though that is not its primary goal.")
                     version "/libatomic_ops-" version ".tar.gz"))
               (sha256
                (base32
-                "0x7071z707msvyrv9dmgahd1sghbkw8fpbagvcag6xs8yp2spzlr"))))
+                "1bwry043f62pc4mgdd37zx3fif19qyrs8f5bw7qxlmkzh5hdyzjq"))))
     (build-system gnu-build-system)
     (outputs '("out" "debug"))
     (synopsis "Accessing hardware atomic memory update operations")