From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GM6gHhPExGMeMwEAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 04:27:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WNupHRPExGPVLgEAG6o9tA (envelope-from ) for ; Mon, 16 Jan 2023 04:27:15 +0100 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 0DE8739145 for ; Mon, 16 Jan 2023 04:27:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHG9J-0000FE-Is; Sun, 15 Jan 2023 22:27:05 -0500 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 1pHG9H-0000Dh-RK for guix-patches@gnu.org; Sun, 15 Jan 2023 22:27:03 -0500 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 1pHG9H-0005p7-JJ for guix-patches@gnu.org; Sun, 15 Jan 2023 22:27:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHG9H-0007sq-Bz for guix-patches@gnu.org; Sun, 15 Jan 2023 22:27:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60224] [PATCH v5 04/13] gnu: make-uboot-package: Simplify build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Jan 2023 03:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60224 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60224@debbugs.gnu.org Cc: rekado@elephly.net, Maxim Cournoyer , vagrant@reproducible-builds.org Received: via spool by 60224-submit@debbugs.gnu.org id=B60224.167383957030127 (code B ref 60224); Mon, 16 Jan 2023 03:27:03 +0000 Received: (at 60224) by debbugs.gnu.org; 16 Jan 2023 03:26:10 +0000 Received: from localhost ([127.0.0.1]:60056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHG8P-0007pp-OP for submit@debbugs.gnu.org; Sun, 15 Jan 2023 22:26:10 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:45624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHG8J-0007o7-FU for 60224@debbugs.gnu.org; Sun, 15 Jan 2023 22:26:03 -0500 Received: by mail-qt1-f176.google.com with SMTP id h21so23615430qta.12 for <60224@debbugs.gnu.org>; Sun, 15 Jan 2023 19:26:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fv4ZwJnjOAMf+hgZd2D51OTW7vjya62HbX+G+hqzdfc=; b=Z7IiyBXePj3pZZj0maVOZ69/dqr0mYE3U2RsKYzH4Kdue6J1UxhTDRECwnir2FjgRw R+ALI9N2V4XSfsuB2lzMXqvSBdFC+zMU2O0UXm7L7Qs2FNXauO/AxF7ZEqxzHWSX04br /Rz/M1WPWTCdJ6AfujuoE+pPI2vfyddGor6YzQC+eqxWDyBJAeNUxQbs9pwZsJ+jGgt8 G9JWqtJh3SZnOMjCjh3S7ihAwKIDYW+P/UD6hjuMaf6UgdXJuni1ZzjRZtWV52lbLZWm Eu505voTJ2UQWtXJw9q3Cp6ixtNu4+0vtf+JAQ7U9eElQGP+qcFKasaJCLVpmR/Y9JfJ 9CeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fv4ZwJnjOAMf+hgZd2D51OTW7vjya62HbX+G+hqzdfc=; b=kGdFj6qTtr3TFpLDxkJurTAD7mx/mMH/VTHExmYs5S0HeEoN+0T6ZmqmtH2nNvIgVu rHIOOYBhLz0oerI+FdVExDM79DVaI2m45tXGA5gDVdBXMuNfSMGU76aOwOdQ7Xg6T8f5 LvGp9bIfCckqjkCVQxIFmOREfWrKEdf9+sYlATxsso+HXpRnC4UVpeB3LPHjptx25kc0 76AamAdOhLcF+K1CPDZA9wj3ZHZSmYWjnUuEvbG+QJ0E3L7LzKgFtGOZCQIj04xORjTW XSNZYfQZ+6igHsGva8Vo+8gg+xt2QSGufvmb7LsgJ1/V/qNN1Y2y4lScTTDO8nN2OkA+ QACQ== X-Gm-Message-State: AFqh2koywwLlna63+Bg/2+YWsG2wf7uQqhhIdOTVh1d/wDRwRe4LvJrM zFFTlXRb2gg8383QWjTUaiG62xsIMlkUJZvV X-Google-Smtp-Source: AMrXdXvq6VrkzjsGsUs0ErqLkTiwCMvrMzJOYfonHWLR+YGEgu7JJT4TFOIvrCCX1jeN8boaGf3rhg== X-Received: by 2002:a05:622a:5d93:b0:3ad:dd32:3410 with SMTP id fu19-20020a05622a5d9300b003addd323410mr31884674qtb.21.1673839557786; Sun, 15 Jan 2023 19:25:57 -0800 (PST) Received: from localhost.localdomain (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id bi1-20020a05620a318100b006fb0e638f12sm17474636qkb.4.2023.01.15.19.25.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 19:25:57 -0800 (PST) From: Maxim Cournoyer Date: Sun, 15 Jan 2023 22:25:35 -0500 Message-Id: <20230116032544.1378-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230116032544.1378-1-maxim.cournoyer@gmail.com> References: <20230116032544.1378-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673839634; a=rsa-sha256; cv=none; b=mzWyOzB6jv7aSc7UEiZWbFyazAqEMVdLW7oxqD2tvQYVKkJxrWXsN5+xXpD5V44MWnBBaY gOtucFUVHgtFwWQi5LEPfQX6BS+8LNZzT5bdfd2PrQTTO53BrxRQZUCCTwubjzVnlQ/vfl wWrAqMQE+TNiOGfFZb/Qn89+bj2B4D1MYqeQu5xOMJs5vOYMRcpQiCO+qBgyWHssPxfL1X fLRaem3tIiSV73QI365HNFexfSyFR/d+UxlRTHhiEVP1fzQPppdjY+8KTegwgkW1wHK7JD ZT0Xo3ZOLMHKRGZ82HOVg/0xZzgIJMUsc6cvE3CmDcTaTvYIFa6bYYqAgKk7zQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Z7IiyBXe; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673839634; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=fv4ZwJnjOAMf+hgZd2D51OTW7vjya62HbX+G+hqzdfc=; b=slQn1rthdJSpgunhycDc4McmbL4Kyf7qMKAF7cxzqZuh8ieiHwcKtGP1GnuXoYrgTLWXdQ 6CaMOBLpYvs9eS1LqelLmGcAyh596aLC36JA4HQrWDSgUSLzO0ltvNKLpfPsdvvL+V/ttr Jv+yLrO/RrwBbVqX5o8uwwjn7XhsRuCWb4zJ0tX5vWNRvDHJXtCwrBN8KGBSqQwWc1KT4m HxKEYMGZ10oiAcZZAVgvIA/KcQYwkPIY7cmLoqHWWy+Qf0uVG5EIOE83yjcW+S/G1FHyIh Kjbl8NoyT4JwXkuB7Slbbe1WvOvYNFiaUDy1FvSm7+MhClmJtBUbjcLYmpZwAA== X-Migadu-Spam-Score: -0.02 X-Spam-Score: -0.02 X-Migadu-Queue-Id: 0DE8739145 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Z7IiyBXe; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-TUID: SnLAjX3O4ZIR * gnu/packages/bootloaders.scm (make-u-boot-package) : Rename procedure to 'native-build?'. [native-inputs]: Remove field. [arguments]: Specify the #:target argument, when not natively building. Adjust for the above renaming. --- Changes in v5: - Remove bogus comment Changes in v3: - Rename %current-target-system to %current-system in comment gnu/packages/bootloaders.scm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 7ec26dda05..b7a31c8b48 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -863,9 +863,9 @@ (define*-public (make-u-boot-package board triplet NAME-SUFFIX is appended to the package name, while APPEND-DESCRIPTION is appended to the package description. U-BOOT can be used when a fork or a different version of U-Boot must be used." - (let ((same-arch? (lambda () - (string=? (%current-system) - (gnu-triplet->nix-system triplet))))) + (let ((native-build? (lambda () + (string=? (%current-system) + (gnu-triplet->nix-system triplet))))) (package (inherit u-boot) (name (string-append "u-boot-" @@ -876,16 +876,11 @@ (define*-public (make-u-boot-package board triplet (string-append (package-description u-boot) "\n\n" append-description) (package-description u-boot))) - (native-inputs - ;; Note: leave the native u-boot inputs first, so that a user can - ;; override the cross-gcc and cross-binutils packages. - `(,@(package-native-inputs u-boot) - ,@(if (not (same-arch?)) - `(("cross-gcc" ,(cross-gcc triplet)) - ("cross-binutils" ,(cross-binutils triplet))) - `()))) + (build-system gnu-build-system) (arguments (substitute-keyword-arguments (package-arguments u-boot) + ((#:target _ #f) + (and (not (native-build?)) triplet)) ((#:modules modules '()) `((ice-9 ftw) (srfi srfi-1) @@ -902,7 +897,7 @@ (define*-public (make-u-boot-package board triplet ((#:make-flags make-flags '()) #~(list "HOSTCC=gcc" "KBUILD_VERBOSE=1" - #$@(if (not (same-arch?)) + #$@(if (not (native-build?)) (list (string-append "CROSS_COMPILE=" triplet "-")) '()) #$@make-flags)) -- 2.38.1