From patchwork Sun Jul 2 13:44:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: dan X-Patchwork-Id: 51509 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 59E7127BBEA; Sun, 2 Jul 2023 14:45:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 72F3D27BBE2 for ; Sun, 2 Jul 2023 14:45:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFxNx-00078S-G3; Sun, 02 Jul 2023 09:45:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFxNu-00078H-Jq for guix-patches@gnu.org; Sun, 02 Jul 2023 09:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFxNu-00023M-BP for guix-patches@gnu.org; Sun, 02 Jul 2023 09:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFxNu-0003mm-79 for guix-patches@gnu.org; Sun, 02 Jul 2023 09:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64421] [PATCH v2] gnu: efivar: Fix cross-compilation. References: <20230702133502.23717-1-i@dan.games> In-Reply-To: <20230702133502.23717-1-i@dan.games> Resent-From: dan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jul 2023 13:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64421 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64421@debbugs.gnu.org Received: via spool by 64421-submit@debbugs.gnu.org id=B64421.168830549614526 (code B ref 64421); Sun, 02 Jul 2023 13:45:02 +0000 Received: (at 64421) by debbugs.gnu.org; 2 Jul 2023 13:44:56 +0000 Received: from localhost ([127.0.0.1]:59559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFxNn-0003mD-RN for submit@debbugs.gnu.org; Sun, 02 Jul 2023 09:44:56 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:53785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFxNj-0003lv-G0 for 64421@debbugs.gnu.org; Sun, 02 Jul 2023 09:44:54 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 92DCA320095A for <64421@debbugs.gnu.org>; Sun, 2 Jul 2023 09:44:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 02 Jul 2023 09:44:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dan.games; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm3; t=1688305484; x=1688391884; bh=hK Zm+ym8doFTgwpzeq2JWoqricG4W4RH3pDZ9ytbP3I=; b=GKEvsP0TTBhWwP+6jM 3ssRYPvmcaTSgjr+06uAQXiEJ2BdYZUh3/ScruIeHyibrQXRlPj6uZ4LWCjjmpiH +fl7Oj2r88MFU1xFHB6S2dIINx+MJprIU2VbRfLyuIKHMPBNkNGmHeVkG+WiGDm7 DkwGeq9+zD7B8RoUoWeUiYBuNXiiPjom3okMH8RxXvCBhOTG2auVnSApI62SaNu8 GaMQM/jhnXX/OYYDXZ14j+Zu+A51zQURUhxYOLqQauQat+gCgQT2/VR+fNbsxxJs rWYcv0//htmaAixyU3T2jWSJLi40LJdlDXmuQPoFwWclEzk/+OSgTOcanyDxgnqc LJEQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688305484; x=1688391884; bh=hKZm+ym8doFTg wpzeq2JWoqricG4W4RH3pDZ9ytbP3I=; b=EBT1kP+5lBfuhPG9P8hjFF+aNCTif yGAua9xA5EO7VwM2NOtVCPKvKRzu3Pdin59cBU1PZDlPDYFGZM7PMsOmW307Pf+Z Lx9S3S7moAvRyxxHoSDcQdBzOw6mqmCRxJXS8g207WtL5I94CaHsWClzIyy+6nLv IZAiZZcPCBRwMlBd066leyIqi57HqwpyNjaSzXBloyyFAPlVgtvmOIKyFN5Uwqeq ZtfkX10pbNTZ1RMIwNwSNW+MJyZHXOHAfFuA4MHhAHCTlWgDiZlzpaA6Vep7Bgn9 KPOV5Ux8/em9uPjG0ZGMWNnAXl1c1IyO2jGtl1dySw5U/xFPUnGo7lqEA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffogggtgfesthekredtre dtjeenucfhrhhomhepuggrnhcuoehisegurghnrdhgrghmvghsqeenucggtffrrghtthgv rhhnpedttddutdejvdegvdetfeeiieevleffteehfffgveeuieetleelveefvdduveejgf enucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepihesuggrnhdrghgrmhgvsh X-ME-Proxy: Feedback-ID: i3b5946ed:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <64421@debbugs.gnu.org>; Sun, 2 Jul 2023 09:44:42 -0400 (EDT) From: dan Date: Sun, 2 Jul 2023 21:44:37 +0800 Message-Id: <20230702134437.768-1-i@dan.games> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches [version]: Temporarily change the version to a git-version. [source]: Fetch source from git, use newer commit to fix cross-build. [arguments]<#:make-flags>: Set HOSTCC to gcc. --- gnu/packages/linux.scm | 85 ++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 41 deletions(-) base-commit: a919a16898e7219fdd26bdfe33a9959e7156d59d diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index ffb736f447..a8aacdffac 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -74,6 +74,7 @@ ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Yovan Naumovski ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> +;;; Copyright © 2023 dan ;;; ;;; This file is part of GNU Guix. ;;; @@ -7223,48 +7224,50 @@ (define-public radeontop (license license:gpl3))) (define-public efivar - (package - (name "efivar") - (version "38") - (source (origin - (method url-fetch) - (uri (string-append "https://github.com/rhboot/" name - "/releases/download/" version "/" name - "-" version ".tar.bz2")) - (sha256 - (base32 - "0jaka7b4lccswjqiv4liclkj6w78gildg7vd6dnw3wf595pfs67h")) - (patches - (search-patches "efivar-211.patch")))) - - (build-system gnu-build-system) - (arguments - (list - ;; Tests require a UEFI system and is not detected in the chroot. - #:tests? #f - #:make-flags - #~(list (string-append "prefix=" #$output) - (string-append "libdir=" #$output "/lib") - (string-append "CC=" #$(cc-for-target)) - (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'build-deterministically - (lambda _ - (substitute* "src/include/defaults.mk" - ;; Don't use -march=native. - (("-march=native") - "")))) - (delete 'configure)))) - (native-inputs - (list mandoc pkg-config)) - (inputs - (list popt)) - (home-page "https://github.com/rhboot/efivar") - (synopsis "Tool and library to manipulate EFI variables") - (description "This package provides a library and a command line + ;; XXX: 15622b7e5761f3dde3f0e42081380b2b41639a48 fixes compilation on i686. + ;; ca48d3964d26f5e3b38d73655f19b1836b16bd2d fixes cross-compilation. + (let ((commit "ca48d3964d26f5e3b38d73655f19b1836b16bd2d") + (revision "0")) + (package + (name "efivar") + (version (git-version "38" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rhboot/efivar") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zsab3hcv1v53cxwkvsk09ifnwhs48a6xa3kxlwvs87yxswspvi8")))) + (build-system gnu-build-system) + (arguments + (list + ;; Tests require a UEFI system and is not detected in the chroot. + #:tests? #f + #:make-flags #~(list (string-append "prefix=" + #$output) + (string-append "libdir=" + #$output "/lib") + (string-append "CC=" + #$(cc-for-target)) "HOSTCC=gcc" + (string-append "LDFLAGS=-Wl,-rpath=" + #$output "/lib")) + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'build-deterministically + (lambda _ + (substitute* "src/include/defaults.mk" + ;; Don't use -march=native. + (("-march=native") + "")))) + (delete 'configure)))) + (native-inputs (list mandoc pkg-config)) + (inputs (list popt)) + (home-page "https://github.com/rhboot/efivar") + (synopsis "Tool and library to manipulate EFI variables") + (description "This package provides a library and a command line interface to the variable facility of UEFI boot firmware.") - (license license:lgpl2.1+))) + (license license:lgpl2.1+)))) (define-public efibootmgr (package