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>master
parent
744e06c867
commit
9816a53716
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2012, 2013, 2018 Ludovic Courtès <ludo@gnu.org>
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
#:use-module (guix licenses)
|
#:use-module (guix licenses)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix utils)
|
||||||
#:use-module (guix build-system gnu))
|
#:use-module (guix build-system gnu))
|
||||||
|
|
||||||
(define-public libsigsegv
|
(define-public libsigsegv
|
||||||
|
@ -40,21 +41,15 @@
|
||||||
(arguments
|
(arguments
|
||||||
`(;; The shared library isn't built by default but some packages need it.
|
`(;; The shared library isn't built by default but some packages need it.
|
||||||
#:configure-flags '("--enable-shared")
|
#:configure-flags '("--enable-shared")
|
||||||
|
;; On some architectures 'struct sigcontext' gets redefined from
|
||||||
;; On MIPS, work around this error:
|
;; %linux-libre-headers/include/asm/sigcontext.h
|
||||||
;;
|
,@(cond ((%current-target-system)
|
||||||
;; In file included from fault-linux-mips-old.h:18:0,
|
`(#:phases (modify-phases %standard-phases
|
||||||
;; [...]
|
(add-before 'configure 'patch-asm-sigcontext-h
|
||||||
;; linux-libre-headers-cross-mips64el-linux-gnu-3.3.8/include/asm/sigcontext.h:57:8: error: redefinition of 'struct sigcontext'
|
(lambda _
|
||||||
,@(if (string-contains (or (%current-target-system) (%current-system))
|
(substitute* (find-files "src" "^fault-.*-old\\.h$")
|
||||||
"mips64el")
|
(("#include <asm/sigcontext\\.h>") "")))))))
|
||||||
`(#:phases (modify-phases %standard-phases
|
(else '()))))
|
||||||
(add-before 'configure 'patch-mips-old-h
|
|
||||||
(lambda _
|
|
||||||
(substitute* "src/fault-linux-mips-old.h"
|
|
||||||
(("#include <asm/sigcontext\\.h>") ""))
|
|
||||||
#t))))
|
|
||||||
'())))
|
|
||||||
(description
|
(description
|
||||||
"GNU libsigsegv is a library to handle page faults, which occur when a
|
"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
|
program tries to access an unavailable region of memory, in user mode. By
|
||||||
|
|
Reference in New Issue