[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/05: gnu: libsigsegv: Fix cross-compiling.
From: |
guix-commits |
Subject: |
05/05: gnu: libsigsegv: Fix cross-compiling. |
Date: |
Thu, 4 Jan 2024 14:50:28 -0500 (EST) |
efraim pushed a commit to branch master
in repository guix.
commit 9816a5371663396bc092eb359222635e5675b174
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Jan 2 09:27:36 2024 +0200
gnu: libsigsegv: Fix cross-compiling.
* gnu/packages/libsigsegv.scm (libsigsegv)[arguments]: When
cross-compiling add a phase to not include extra headers.
Change-Id: Ie2d23fd037ed533dacf08acf52771b7ab1d446ac
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
---
gnu/packages/libsigsegv.scm | 27 +++++++++++----------------
1 file 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