summary refs log tree commit diff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2023-03-20 23:10:38 +0100
committerLudovic Courtès <ludo@gnu.org>2023-03-30 12:44:18 +0200
commit6cdd444a56e672d248ba411d41faf2810a14f8cc (patch)
treeea8f857bc3ce5ea62289419c8359927e79c18c9e /gnu/packages/gcc.scm
parentbbb849f11f39d5455aa253d6e8e55e98382690c9 (diff)
downloadguix-6cdd444a56e672d248ba411d41faf2810a14f8cc.tar.gz
gnu: gcc@11: Patch libpthread on GNU/Hurd.
* gnu/packages/gcc.scm (gcc-11)[arguments]: Add 'patch-hurd-libpthread'
phase.
* gnu/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index ce6e3e7a83..a511cdbc45 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -706,7 +706,18 @@ It also includes runtime support libraries for these languages.")
                                      "gcc-10-tree-sra-union-handling.patch"))
             (modules '((guix build utils)))
             (snippet gcc-canadian-cross-objdump-snippet)))
-
+   (arguments
+    (substitute-keyword-arguments (package-arguments gcc-8)
+      ((#:phases phases #~%standard-phases)
+       (if (target-hurd?)
+           #~(modify-phases #$phases
+               (add-after 'unpack 'patch-hurd-libpthread
+                 (lambda _
+                   (define patch
+                     #$(local-file
+                        (search-patch "gcc-11-libstdc++-hurd-libpthread.patch")))
+                   (invoke "patch" "--force" "-p1" "-i" patch))))
+           phases))))
    (properties
     `((compiler-cpu-architectures
        ("aarch64" ,@%gcc-11-aarch64-micro-architectures)