aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/attr.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-09-14 11:07:05 +0200
committerLudovic Courtès <ludo@gnu.org>2021-09-14 15:49:56 +0200
commit49ab267cbec17643e265305c109dc397b5e43cf5 (patch)
tree583a27407b1d66de6a3d5c1e3a4571c0aa749c8b /gnu/packages/attr.scm
parent7701a3cf2342fe2522edd91e4b695d4093875211 (diff)
downloadguix-49ab267cbec17643e265305c109dc397b5e43cf5.tar
guix-49ab267cbec17643e265305c109dc397b5e43cf5.tar.gz
gnu: attr: Allow compilation on GNU/Hurd.
* gnu/packages/attr.scm (attr)[arguments]: Add 'skip-linux-syscalls' phase when 'hurd-target?' returns true.
Diffstat (limited to 'gnu/packages/attr.scm')
-rw-r--r--gnu/packages/attr.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm
index a062125303..8c1a4aca7c 100644
--- a/gnu/packages/attr.scm
+++ b/gnu/packages/attr.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
-;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2016, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
@@ -23,6 +23,7 @@
#:use-module (guix licenses)
#:use-module (gnu packages perl)
#:use-module (gnu packages gettext)
+ #:use-module (gnu packages hurd)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu))
@@ -42,6 +43,17 @@
(arguments
`(#:phases
(modify-phases %standard-phases
+ ,@(if (hurd-target?)
+ `((add-before 'configure 'skip-linux-syscalls
+ (lambda _
+ ;; Starting from 2.5.1, libattr includes Linux-specific
+ ;; calls to syscall(2). Comment them out for GNU/Hurd
+ ;; and instead use the glibc-provided wrappers.
+ (substitute* "Makefile.in"
+ (("libattr/syscalls\\.c") "")
+ (("\tlibattr/la-syscalls\\.lo") "")
+ (("-Wl,[[:graph:]]+/libattr\\.lds") "")))))
+ '())
(replace 'check
(lambda* (#:key target #:allow-other-keys)
;; Use the right shell.