From patchwork Sun Jul 11 11:47:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 31300 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B6D9527BC83; Sun, 11 Jul 2021 12:51:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3BBD027BC81 for ; Sun, 11 Jul 2021 12:51:05 +0100 (BST) Received: from localhost ([::1]:55824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2XzE-0008Uv-Aq for patchwork@mira.cbaines.net; Sun, 11 Jul 2021 07:51:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2XxN-0004Ip-JJ for guix-patches@gnu.org; Sun, 11 Jul 2021 07:49:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m2XxN-0008Mv-88 for guix-patches@gnu.org; Sun, 11 Jul 2021 07:49:09 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m2XxN-00075b-84 for guix-patches@gnu.org; Sun, 11 Jul 2021 07:49:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH v5 19/20] libelf: Update configure script and config.guess and config.sub. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Jul 2021 11:49:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49025 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49025@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 49025-submit@debbugs.gnu.org id=B49025.162600410327064 (code B ref 49025); Sun, 11 Jul 2021 11:49:09 +0000 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:23 +0000 Received: from localhost ([127.0.0.1]:34078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xwc-00072M-Gh for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:23 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwN-0006y4-I1 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:08 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no6sp; Sun, 11 Jul 2021 13:48:07 +0200 From: Maxime Devos Date: Sun, 11 Jul 2021 13:47:22 +0200 Message-Id: <20210711114723.27568-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004087; bh=PmFSgOK+NW3vsdrropSeKY9k4clOeil1DsdklQk68os=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JGjd3BbyspEvzgwufOwHaPl3n4HMvAUrqolL4tT0BJbWE0KwuWC9U6xgaQHB+9atp MLqqLj8K8clE9ScTf0XuRbxejto7IQ/I9s9OOxYtw7X+omaDHXHM8kEF+ccH9vxUd9 nuGOQi9IvkLNZeXeyW5yDuL3K+TYqLi4q6YPU3Dsq8w7u/KKyWQkXCiyaitRmoVFEi EFf5aAsCN2mCRzdC20noNeK5XR69tAK7ZIR1RGGkWZgDRAAUFCZ/Z3JaMaM+dKoGkQ 1fgKJckZbi51yKGwjAZQfzKCiqv5w7zyFkEfBsYuEmFkhtOt8SSKT1vhkrDlEOCeJm 9nKYuT1kAMVaw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; 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")