[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49025] [PATCH v4 core-updates 09/36] libgpg-error: Prevent silent m
From: |
Maxime Devos |
Subject: |
[bug#49025] [PATCH v4 core-updates 09/36] libgpg-error: Prevent silent miscompilation some systems. |
Date: |
Sat, 19 Jun 2021 17:04:31 +0200 |
* gnu/packages/gpg.scm
(libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only
link to src/syscfg/lock-obj-pub.linux-gnu.h if the package
is being compiled for a Linux target. Do not link either
if the architecture is unknown, as the headers vary with
the architecture.
---
gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 2f44e6ec6a..de213d381f 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2020 Fredrik Salomonsson <plattfot@posteo.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -77,6 +78,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
+ #:use-module (ice-9 match)
#:use-module (srfi srfi-1))
(define-public libgpg-error
@@ -94,27 +96,37 @@
(build-system gnu-build-system)
(arguments
(if (%current-target-system)
- `(#:modules ((ice-9 match)
- (guix build gnu-build-system)
+ `(#:modules ((guix build gnu-build-system)
(guix build utils))
#:phases
(modify-phases %standard-phases
;; When cross-compiling, some platform specific properties cannot
;; be detected. Create a symlink to the appropriate platform
- ;; file. See Cross-Compiling section at:
+ ;; file if required. Note that these platform files depend on
+ ;; both the operating system and architecture!
+ ;;
+ ;; See Cross-Compiling section at:
;; https://github.com/gpg/libgpg-error/blob/master/README
(add-after 'unpack 'cross-symlinks
- (lambda* (#:key target inputs #:allow-other-keys)
- (let ((triplet
- (match (string-take target
- (string-index target #\-))
- ("armhf" "arm-unknown-linux-gnueabi")
- ("mips64el" "mips-unknown-linux-gnu")
- (x
- (string-append x "-unknown-linux-gnu")))))
- (symlink
- (string-append "lock-obj-pub." triplet ".h")
- "src/syscfg/lock-obj-pub.linux-gnu.h"))))))
+ (lambda _
+ (define (link triplet source)
+ (symlink (string-append "lock-obj-pub." triplet ".h")
+ (string-append "src/syscfg/lock-obj-pub."
+ source ".h")))
+ ,(let* ((target (%current-target-system))
+ (architecture
+ (string-take target (string-index target #\-))))
+ (cond ((target-linux? target)
+ (match architecture
+ ("armhf"
+ `(link "arm-unknown-linux-gnueabi" "linux-gnu"))
+ ("mips64el"
+ `(link "mips-unknown-linux-gnu" "linux-gnu"))
+ ;; Don't always link to the "linux-gnu"
+ ;; configuration, as this is not correct for
+ ;; all architectures.
+ (_ #t)))
+ (#t #t)))))))
'()))
(native-inputs `(("gettext" ,gettext-minimal)))
(home-page "https://gnupg.org")
--
2.32.0
- [bug#49025] [PATCH v4 core-updates 19/36] openssl: Move documentation instead of copying and deleting it., (continued)
- [bug#49025] [PATCH v4 core-updates 19/36] openssl: Move documentation instead of copying and deleting it., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 27/36] fontconfig: Make the #:configure-flags argument a G-expression., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 31/36] glib: Look up "tzdata" in 'native-inputs', not 'inputs'., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 22/36] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 36/36] meson: Support cross-compilation., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 12/36] libgcrypt: Fix cross-compilation build error., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 15/36] python: Fix reference to input when cross-compiling., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 16/36] openssl: Remove trailing #t from phases., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 18/36] openssl: Use G-exp machinery for referring to outputs., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 20/36] openssl: Move all man pages to separate output, not only man3., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 09/36] libgpg-error: Prevent silent miscompilation some systems.,
Maxime Devos <=
- [bug#49025] [PATCH v4 core-updates 21/36] openssl: Find bin/env when cross-compiling., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 35/36] cross-base: Fix cross-compiler for i686-linux-gnu., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 33/36] tk: Do not use %build-inputs when cross-compiling., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 26/36] bash: Fix cross-compilation build error., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 34/36] libelf: Use the cross-compiler when cross-compiling., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 25/36] bash: Make #:configure-flags a G-expression., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 32/36] tk: Make #:configure-flags a G-expression., Maxime Devos, 2021/06/19
- [bug#49025] [PATCH v4 core-updates 23/36] readline: Make #:configure-flags a G-expression., Maxime Devos, 2021/06/19