From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6JU0Fk3WzGDhYgAAgWs5BA (envelope-from ) for ; Fri, 18 Jun 2021 19:22:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id YAgNEk3WzGAMTAAA1q6Kng (envelope-from ) for ; Fri, 18 Jun 2021 17:22:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F0EEA12160 for ; Fri, 18 Jun 2021 19:22:20 +0200 (CEST) Received: from localhost ([::1]:53936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luICB-0002b0-U3 for larch@yhetil.org; Fri, 18 Jun 2021 13:22:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luIAF-0008D1-3h for guix-patches@gnu.org; Fri, 18 Jun 2021 13:20:19 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luIAE-0004Le-Nx for guix-patches@gnu.org; Fri, 18 Jun 2021 13:20:18 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luIAE-0004vh-Kf for guix-patches@gnu.org; Fri, 18 Jun 2021 13:20:18 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49025] [PATCH v3 core-updates 34/37] libelf: Use the cross-compiler when cross-compiling. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 17:20:18 +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: othacehe@gnu.org, Maxime Devos Received: via spool by 49025-submit@debbugs.gnu.org id=B49025.162403679618655 (code B ref 49025); Fri, 18 Jun 2021 17:20:18 +0000 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:56 +0000 Received: from localhost ([127.0.0.1]:58082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9s-0004qj-Ch for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:56 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9H-0004j9-3S for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:19 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKJeW; Fri, 18 Jun 2021 19:19:18 +0200 From: Maxime Devos Date: Fri, 18 Jun 2021 19:16:28 +0200 Message-Id: <20210618171631.20534-34-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036758; bh=RWokKCzoehfrSlcLNti6dqTDx97owvOxCcB16lv8MSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Eilbndoqs0aRP3VagJ4JicRj8G5sQmmRiYhb6/RY+FnYriwwlPyXPyDX9+i6d6q+F FrubbxR+sP9XRqeYCUKdFzj12b6j0g4c27hUgYtjVyINAImn2C1FYIYy69BHaiD2DO 2Nx39FUSrwzb2EuJh6F5ve7NgrFCUgjktZ60rCQzGoOTLUXyd2p3bFSvtf1MNjaqtN xC/y+MicXDsP6CrlLEcrEP+Wkg+F9cJ+1ovHkvCd+4XHnLD7v4LZBcoY/x4czdcF8e n7eOw6T8GUk9Zf3N0f+RV1QPOiNQ2smAOYBSF+tkRhaIqfGDo53xtKz+oR4dYZfSI2 R/I6L5S/ziA2g== 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624036941; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=RWokKCzoehfrSlcLNti6dqTDx97owvOxCcB16lv8MSw=; b=kDvbVi3G6oSFUDb2kRtK4n39Mcwchiy7axwBSDnGseJlmW6FZSNJRH/AYlTHAh7pXfXRt0 hsVvvx+uDxhQMJlhCmFQnMeLmVIsBoGym+obDPNNHIrhf+C+KBsQL+ktHnwD0A9NiFxE0B 3iNTgqVgmJsOH52ULZv4RQ8tt0sOY00ei96p1P3n5WPpaqn93nq/ZeNLTwJ/qjfGDoazK2 AKwim6LxCg785OlRSnnKX0ZOmJLV55WrtoUy8uI2amgbDQeFGA3EfueXxNdfCsmMyZAM32 Zh7P3I3UW54DMQUEttZrfSrPgxrjsJUxzrec+FC8Ez9bRT0cAeJexyGr/FJdJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624036941; a=rsa-sha256; cv=none; b=B4EyHE3qNdRVj2z6C1JCJ0ka4qUaR/NsJ22rcuBwGClHSXVhQfeKsmgLN+/DVdOXqzEAPF OyKD+pWsQMuqxlYvKEXPZlOr43EZMxEyL2puYjjCo5R01GUEPoXjthY9T7BcB0p8p2uGOJ pIoi7o69FEy3Et+Rk7OlR6JISDSPMcFPFNNxRrE+K9rbSZE1CFpzr8zAI/ey0kSs1relwa j6/0EqNrUNN2ng5V43kix9Z9NCKVdiLpCiO4R6p+S82YMStmamcmma/vsBkRTM0LiONT6o X8iLG+vikle4dkw3+RruF8q65a7f8CQ2GZws5JZxE+tynjNamUrVL6nHzkx/GA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Eilbndoq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.17 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=Eilbndoq; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: F0EEA12160 X-Spam-Score: 1.17 X-Migadu-Scanner: scn1.migadu.com X-TUID: g3j2uL8tS9xx * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script when cross-compiling. (libelf)[arguments]<#:phases>{configure}: Do not replace when cross-compiling. (libelf)[native-inputs]: Add autoconf when cross-compiling. --- gnu/packages/elf.scm | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..66c2334e5c 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,36 @@ 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") - '())))))))) + ,(if (%current-target-system) + ;; This old 'configure' script doesn't + ;; support cross-compilation well. E.g., it fails + ;; to find the cross-compiler. + `(add-before 'bootstrap 'delete-configure + (lambda _ + (delete-file "configure"))) + `(replace 'configure + ;; This old `configure' script doesn't support + ;; variables passed as arguments. TODO: would + ;; simply regenerating 'configure' work + ;; well enough, even if compiling natively + ;; on powerpc or aarch64? + (lambda* (#:key outputs #:allow-other-keys) + (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") + '()))))))))) + (native-inputs + (if (%current-target-system) + `(("autoconf" ,autoconf)) + '())) (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