[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#49025] [PATCH v5 19/20] libelf: Update configure script and config.
From: |
Maxime Devos |
Subject: |
[bug#49025] [PATCH v5 19/20] libelf: Update configure script and config.guess and config.sub. |
Date: |
Sun, 11 Jul 2021 13:47:22 +0200 |
The current configure script is too old to find the cross-compiler
and support variables passed as arguments. Also, config.guess and
config.sub are too old to recognise powerpc64 and aarch64. Solve
this by regenerating the 'configure' script and replacing
'config.guess' and 'config.sub'.
* gnu/packages/elf.scm
(libelf)[arguments]<#:phases>{configure}: Remove phase.
(libelf)[arguments]<#:phases>{delete-configure}: Regenerate
the configure script and replace 'config.guess' and 'config.sub'.
---
gnu/packages/elf.scm | 44 ++++++++++++++++++++++++++++----------------
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 0309dd95b5..2bc1d00048 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020 Mark Wielaard <mark@klomp.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,7 @@
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+))
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages gcc)
@@ -205,22 +207,32 @@ static analysis of the ELF binaries at hand.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- ;; This old `configure' script doesn't support
- ;; variables passed as arguments.
- (let ((out (assoc-ref outputs "out")))
- (setenv "CONFIG_SHELL" (which "bash"))
- (invoke "./configure"
- (string-append "--prefix=" out)
- ,@(if (string=? "powerpc64le-linux"
- (%current-system))
- '("--host=powerpc64le-unknown-linux-gnu")
- '())
- ,@(if (string=? "aarch64-linux"
- (%current-system))
- '("--host=aarch64-unknown-linux-gnu")
- '()))))))))
+ ;; This old 'configure' script doesn't support cross-compilation
+ ;; well. I.e., it fails to find the cross-compiler. Also,
+ ;; the old `configure' script doesn't support variables passed as
+ ;; arguments. A third problem is that config.sub is too old to
+ ;; recognise aarch64 and powerpc64le.
+ ;;
+ ;; Solve this by regenerating the configure script and letting
+ ;; autoreconf update 'config.sub'. While 'config.sub' is updated
+ ;; anyway, update 'config.guess' as well.
+ (add-before 'bootstrap 'delete-configure
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (delete-file "configure")
+ (delete-file "config.sub")
+ (delete-file "config.guess")
+ (for-each (lambda (file)
+ (install-file
+ (string-append
+ (assoc-ref (or native-inputs inputs) "automake")
+ "/share/automake-"
+ ,(version-major+minor (package-version automake))
+ "/" file) "."))
+ '("config.sub" "config.guess")))))))
+ (native-inputs
+ `(("autoconf" ,autoconf)
+ ;; For up-to-date 'config.guess' and 'config.sub'
+ ("automake" ,automake)))
(home-page (string-append "https://web.archive.org/web/20181111033959/"
"http://www.mr511.de/software/english.html"))
(synopsis "ELF object file access library")
--
2.32.0
- [bug#49025] [PATCH v5 01/20] utils: Define target-linux? predicate., (continued)
- [bug#49025] [PATCH v5 03/20] packages: Define this-package-input and this-package-native-input., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 04/20] net-base: Don't cross-compile., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 05/20] tzdata: Don't bother with cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 07/20] libgpg-error: Prevent silent miscompilation some systems., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 06/20] libgpg-error: Remove trailing #f from phases., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 08/20] libgpg-error: Fix cross-compilation error., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 11/20] openssl: Make the #:phases argument a G-expression., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 13/20] openssl: Move documentation instead of copying and deleting it., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 14/20] openssl: Move all man pages to separate output, not only man3., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 19/20] libelf: Update configure script and config.guess and config.sub.,
Maxime Devos <=
- [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 09/20] python: Fix reference to input when cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 10/20] openssl: Remove trailing #t from phases., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 15/20] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 16/20] glib: Use a correct python in scripts when cross-compiling., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 18/20] glib: Look up "tzdata" in 'native-inputs', not 'inputs'., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 12/20] openssl: Use G-exp machinery for referring to outputs., Maxime Devos, 2021/07/11
- [bug#49025] [PATCH v5 17/20] glib: Verify the cross-compiled python is used in installed scripts., Maxime Devos, 2021/07/11