Subject: [PATCH] gnu: libgc: Fix Check for Hurd systems.
From: rennes <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Mon, 01 May 2017 10:47:48 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

This patch is libgc for core-updates.

On GNU/Hurd systems during the 'Check' phase, there is a deadlock  
caused by the 'gctest' test.

We set "--disable-gcj-support" to configure script to pass the 'gctest'  
test.

bug report:
https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html
discussion:
https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html

Tested in Linux-x86_64, Hurd and cross-compiling (master branch).

From 3369231f100c0195f04ee6e76e19dc1ffbd99e10 Mon Sep 17 00:00:00 2001
From: rennes <[email-masked]>
Date: Mon, 1 May 2017 08:41:04 -0500
Subject: [PATCH] gnu: libgc: Fix Check for Hurd systems.

* gnu/packages/bdw-gc.scm (libgc)[arguments]: On GNU/Hurd systems
add '--disable-gcj-support' to #:configure-flags. Adjust #:configure-flags
to disable GCJ support and pass the 'gctest' test.
---
 gnu/packages/bdw-gc.scm | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index b9732374d..790a23857 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès <[email-masked]>
 ;;; Copyright © 2014 Mark H Weaver <[email-masked]>
 ;;; Copyright © 2016 Leo Famulari <[email-masked]>
+;;; Copyright © 2017 Rene Saavedra <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -23,7 +24,8 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
-  #:use-module (gnu packages pkg-config))
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages hurd))
 
 (define-public libgc
   (package
@@ -38,8 +40,20 @@
               "143x7g0d0k6250ai6m2x3l4y352mzizi4wbgrmahxscv2aqjhjm1"))))
    (build-system gnu-build-system)
    (arguments
-    '(#:configure-flags '(;; Install gc_cpp.h et al.
-                          "--enable-cplusplus")))
+    `(#:configure-flags
+      (list
+       ;; Install gc_cpp.h et al.
+       "--enable-cplusplus"
+       ;; In GNU/Hurd systems during the 'Check' phase,
+       ;; there is a deadlock caused by the 'gctest' test.
+       ;; To disable the error set "--disable-gcj-support"
+       ;; to configure script. See bug report and discussion:
+       ;; <https://lists.opendylan.org/pipermail/bdwgc/2017-April/006275.html>
+       ;; <https://lists.gnu.org/archive/html/bug-hurd/2017-01/msg00008.html>
+       ,@(if (hurd-triplet? (or (%current-system)
+                                (%current-target-system)))
+             '("--disable-gcj-support")
+             '()))))
    (native-inputs `(("pkg-config" ,pkg-config)))
    (inputs `(("libatomic-ops" ,libatomic-ops)))
    (outputs '("out" "debug"))
-- 
2.12.0