summary refs log tree commit diff
path: root/gnu/packages/c.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-09-29 07:26:37 +0200
committerMarius Bakke <marius@gnu.org>2022-09-29 07:26:37 +0200
commitf66067febc111d03929c95c067f0b88a8f8abb7b (patch)
treed571997c6756f60a9e9ddd6396e46d05ca7e0dde /gnu/packages/c.scm
parent5dc5d6fa8136f067c85295d88018a7cd8b7cfe40 (diff)
parent45eac6cdf5c8d9d7b0c564b105c790d2d2007799 (diff)
downloadguix-f66067febc111d03929c95c067f0b88a8f8abb7b.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/c.scm')
-rw-r--r--gnu/packages/c.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 10275970b1..84b537022d 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pcre)
@@ -1182,6 +1183,41 @@ performance concurrent systems developed in C99+.")
     (license (list license:bsd-2        ;everything except...
                    license:asl2.0))))   ;src/ck_hp.c
 
+(define-public libdispatch
+  (package
+    (name "libdispatch")
+    (version "5.7")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/apple/swift-corelibs-libdispatch")
+             (commit (string-append "swift-" version "-RELEASE"))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0skg1azbhbg7y0ql2a5sx6lmfip8l1rajqm95zzf9xv45n4dg9nn"))))
+    (build-system cmake-build-system)
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               ;; Use Clang instead of GCC.
+               (add-before 'configure 'prepare-build-environment
+                 (lambda _
+                   (setenv "AR" "llvm-ar")
+                   (setenv "NM" "llvm-nm")
+                   (setenv "CC" "clang")
+                   (setenv "CXX" "clang++"))))))
+    (native-inputs (list clang llvm))
+    (home-page "https://apple.github.io/swift-corelibs-libdispatch/")
+    (synopsis "Concurrent code execution on multicore hardware")
+    (description
+     "Grand Central Dispatch (GCD or libdispatch) implements a concurrency model
+wherein program tasks are divided into work items.  These can be run
+sequentially or in parallel, with optional synchronization in between, and GCD
+will take care of dispatching tasks to available cores.")
+    (license license:asl2.0)))
+
 (define-public utf8-h
   ;; The latest tag is used as there is no release.
   (let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734")