summaryrefslogtreecommitdiff
path: root/gnu/packages/libsigsegv.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2024-01-07 21:17:02 +0100
committerLudovic Courtès <ludo@gnu.org>2024-01-07 21:29:53 +0100
commitb71d2ba8785e9883f4f2d239c557c9034b6be876 (patch)
tree52858686958c4c66c6c1f7a98ae63c3269eacb15 /gnu/packages/libsigsegv.scm
parentc5d670308cbd0a6ee67e04e58cb77fa40e8ad328 (diff)
parent5f8a993aa85554ca09bd27139230d7664107e1b6 (diff)
Merge branch 'master' into core-updates
Change-Id: I150b4077fffca97c860439292a8d053579d64cb7
Diffstat (limited to 'gnu/packages/libsigsegv.scm')
-rw-r--r--gnu/packages/libsigsegv.scm27
1 files changed, 11 insertions, 16 deletions
diff --git a/gnu/packages/libsigsegv.scm b/gnu/packages/libsigsegv.scm
index ebbdd2ad90..71afb35be0 100644
--- a/gnu/packages/libsigsegv.scm
+++ b/gnu/packages/libsigsegv.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2018 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2024 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +21,7 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system gnu))
(define-public libsigsegv
@@ -40,21 +41,15 @@
(arguments
`(;; The shared library isn't built by default but some packages need it.
#:configure-flags '("--enable-shared")
-
- ;; On MIPS, work around this error:
- ;;
- ;; In file included from fault-linux-mips-old.h:18:0,
- ;; [...]
- ;; linux-libre-headers-cross-mips64el-linux-gnu-3.3.8/include/asm/sigcontext.h:57:8: error: redefinition of 'struct sigcontext'
- ,@(if (string-contains (or (%current-target-system) (%current-system))
- "mips64el")
- `(#:phases (modify-phases %standard-phases
- (add-before 'configure 'patch-mips-old-h
- (lambda _
- (substitute* "src/fault-linux-mips-old.h"
- (("#include <asm/sigcontext\\.h>") ""))
- #t))))
- '())))
+ ;; On some architectures 'struct sigcontext' gets redefined from
+ ;; %linux-libre-headers/include/asm/sigcontext.h
+ ,@(cond ((%current-target-system)
+ `(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'patch-asm-sigcontext-h
+ (lambda _
+ (substitute* (find-files "src" "^fault-.*-old\\.h$")
+ (("#include <asm/sigcontext\\.h>") "")))))))
+ (else '()))))
(description
"GNU libsigsegv is a library to handle page faults, which occur when a
program tries to access an unavailable region of memory, in user mode. By