[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49025] [PATCH v3 core-updates 22/37] openssl: Extract logic for com
From: |
Maxime Devos |
Subject: |
[bug#49025] [PATCH v3 core-updates 22/37] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. |
Date: |
Fri, 18 Jun 2021 19:16:16 +0200 |
By computing this value outside the build code, new targets
can be added without causing rebuilds for other targets.
* gnu/packages/tls.scm
(target->openssl-target): New procedure.
(openssl)[arguments]<#:phases>{set-cross-compile}: Use it.
---
gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------
1 file changed, 27 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index a4e754e27f..af91e42888 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -313,6 +313,31 @@ required structures.")
(define-public guile3.0-gnutls
(deprecated-package "guile3.0-gnutls" gnutls))
+(define (target->openssl-target target)
+ "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling
+OpenSSL for TARGET."
+ ;; Keep this code outside the build code,
+ ;; such that new targets can be added
+ ;; without causing rebuilds for other targets.
+ (cond ((string-prefix? "i586" target)
+ "hurd-x86")
+ ((string-prefix? "i686" target)
+ "linux-x86")
+ ((string-prefix? "x86_64" target)
+ "linux-x86_64")
+ ((string-prefix? "mips64el" target)
+ "linux-mips64")
+ ((string-prefix? "arm" target)
+ "linux-armv4")
+ ((string-prefix? "aarch64" target)
+ "linux-aarch64")
+ ((string-prefix? "powerpc64le" target)
+ "linux-ppc64le")
+ ((string-prefix? "powerpc64" target)
+ "linux-ppc64")
+ ((string-prefix? "powerpc" target)
+ "linux-ppc")))
+
(define-public openssl
(package
(name "openssl")
@@ -351,25 +376,8 @@ required structures.")
(lambda* (#:key target #:allow-other-keys)
(setenv "CROSS_COMPILE" (string-append target "-"))
(setenv "CONFIGURE_TARGET_ARCH"
- (cond
- ((string-prefix? "i586" target)
- "hurd-x86")
- ((string-prefix? "i686" target)
- "linux-x86")
- ((string-prefix? "x86_64" target)
- "linux-x86_64")
- ((string-prefix? "mips64el" target)
- "linux-mips64")
- ((string-prefix? "arm" target)
- "linux-armv4")
- ((string-prefix? "aarch64" target)
- "linux-aarch64")
- ((string-prefix? "powerpc64le" target)
- "linux-ppc64le")
- ((string-prefix? "powerpc64" target)
- "linux-ppc64")
- ((string-prefix? "powerpc" target)
- "linux-ppc"))))))
+ #$(target->openssl-target
+ (%current-target-system))))))
#~())
(replace 'configure
(lambda _
--
2.32.0
- [bug#49025] [PATCH v3 core-updates 06/37] net-base: Don't cross-compile., (continued)
- [bug#49025] [PATCH v3 core-updates 06/37] net-base: Don't cross-compile., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 11/37] libgpg-error: Fix cross-compilation error., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 10/37] libgpgerror: Maybe fix a cross-compilation bug., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 03/37] packages: Define this-package-input and this-package-native-input., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 14/37] wrap-python3: Fix cross-compilation., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 17/37] openssl: Make the #:phases argument a G-expression., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 18/37] openssl: Use G-exp machinery for referring to outputs., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 19/37] openssl: Move documentation instead of copying and deleting it., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 20/37] openssl: Move all man pages to separate output, not only man3., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 21/37] openssl: Find bin/env when cross-compiling., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 22/37] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH.,
Maxime Devos <=
- [bug#49025] [PATCH v3 core-updates 23/37] readline: Make #:configure-flags a G-expression., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 16/37] openssl: Remove trailing #t from phases., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 27/37] fontconfig: Make the #:configure-flags argument a G-expression., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 30/37] glib: Verify the cross-compiled python is used in installed scripts., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 12/37] libgcrypt: Fix cross-compilation build error., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 09/37] libgpg-error: Prevent silent miscompilation some systems., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 15/37] python: Fix reference to input when cross-compiling., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 28/37] fontconfig: Fix build error when cross-compiling., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 26/37] bash: Fix cross-compilation build error., Maxime Devos, 2021/06/18
- [bug#49025] [PATCH v3 core-updates 29/37] glib: Use a correct python in scripts when cross-compiling., Maxime Devos, 2021/06/18