From patchwork Sun Jul 2 13:35:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: dan X-Patchwork-Id: 51508 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 2E94E27BBEA; Sun, 2 Jul 2023 14:36:20 +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 6726927BBE2 for ; Sun, 2 Jul 2023 14:36:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFxFF-0005WR-Nd; Sun, 02 Jul 2023 09:36: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 1qFxFD-0005WF-EN for guix-patches@gnu.org; Sun, 02 Jul 2023 09:36:03 -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 1qFxFD-0000Jd-5t for guix-patches@gnu.org; Sun, 02 Jul 2023 09:36:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFxFC-0003YW-FE for guix-patches@gnu.org; Sun, 02 Jul 2023 09:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64421] [PATCH] gnu: efivar: Fix cross-compilation. Resent-From: dan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jul 2023 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64421 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64421@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168830494313642 (code B ref -1); Sun, 02 Jul 2023 13:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2023 13:35:43 +0000 Received: from localhost ([127.0.0.1]:59543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFxEs-0003Xy-Ky for submit@debbugs.gnu.org; Sun, 02 Jul 2023 09:35:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:40222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFxEo-0003Xn-6b for submit@debbugs.gnu.org; Sun, 02 Jul 2023 09:35:40 -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 1qFxEn-0005SF-TM for guix-patches@gnu.org; Sun, 02 Jul 2023 09:35:37 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFxEl-00009z-M5 for guix-patches@gnu.org; Sun, 02 Jul 2023 09:35:37 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 04CEC3200927 for ; Sun, 2 Jul 2023 09:35:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 02 Jul 2023 09:35:31 -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=1688304930; x=1688391330; bh=HB rWc/SGABIJV/B/Qi7nA5zwZDPWXUd783xEQCVOIW4=; b=icMhtnlvZkx52EQwFY DEoIVBAPugcar7d/O14DbjJ1HnzpVHULCRwIqYopfcP+UiQydGbuul8o/RG308Zj X0mv8EuzCHQbSWw02UZpSrrW17AwMLrnbvTD7r2+CJYdEkvoNvQklI4Q2Kdpdh77 WMRxSpptPkoKBwfKE58vEBCBjPvco/58jli4m0WPgqfbf6SRtXNnaTrMgkJlcNPZ JqKfyoF/2iBQXORIXHTvgDTwYbTX9nUxoBX7NHW7qZYcu6a9x3OtQQtIUtHo/lKM akg1+lQA1Cdj9HEfUAw1mSEg8bdY/lDmNdGSuE23TQ0QeeW/xRcYTS5GFQkdGqp0 TC+g== 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=1688304930; x=1688391330; bh=HBrWc/SGABIJV /B/Qi7nA5zwZDPWXUd783xEQCVOIW4=; b=BsOXMwjkb1Txd4Ns45h1i0kjYq0bw ETdVHnykeaeylDZVfBNfsoeZrM3HOGorehmaxibRIDIDWWozXwfWhupZdnucbpEG DXmgumkFQi/LuQDY8IFdocfXyf4xJf8HRUI/mCiiG88BuBhRb27P5fpMzhVsq2L0 TmVWnCWs3ymBr1EnZ27NVu+qbiY5EIo9dMs5fY/f+QltTyGJB3RwUOhzLbTFS5EG akW4GEyxPivEIockNma/v8cwwcAr+ChNxvL2HDiKugsVB+7HF6NporLGPQF4s0ox 2JCgzhDvIn0n/YfZA6raS1sI1qz0aDtabjKSAw9dcdeJwf/1tVRWnTNCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddtgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffogggtgfesthekredtre dtjeenucfhrhhomhepuggrnhcuoehisegurghnrdhgrghmvghsqeenucggtffrrghtthgv rhhnpedttddutdejvdegvdetfeeiieevleffteehfffgveeuieetleelveefvdduveejgf enucffohhmrghinhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomhepihesuggrnhdrghgrmhgvsh X-ME-Proxy: Feedback-ID: i3b5946ed:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sun, 2 Jul 2023 09:35:29 -0400 (EDT) From: dan Date: Sun, 2 Jul 2023 21:35:02 +0800 Message-Id: <20230702133502.23717-1-i@dan.games> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Received-SPF: pass client-ip=64.147.123.19; envelope-from=i@dan.games; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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. copyright --- 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..16b9755f52 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