From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 EKT5FRsgv2MGSQEAbAwnHQ (envelope-from ) for ; Wed, 11 Jan 2023 21:46:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0MxqFhsgv2PBwAAA9RJhRA (envelope-from ) for ; Wed, 11 Jan 2023 21:46:19 +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 0FF05DB58 for ; Wed, 11 Jan 2023 21:46:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pFhyF-0001eM-Ne; Wed, 11 Jan 2023 15:45:15 -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 1pFhy5-0001Ru-Rr for guix-patches@gnu.org; Wed, 11 Jan 2023 15:45:07 -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 1pFhy5-0007hT-JF for guix-patches@gnu.org; Wed, 11 Jan 2023 15:45:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pFhy5-0007IV-Fm for guix-patches@gnu.org; Wed, 11 Jan 2023 15:45:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60224] [PATCH v4 03/12] gnu: make-uboot-package: Simplify build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Jan 2023 20:45:05 +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.167346990328014 (code B ref 60224); Wed, 11 Jan 2023 20:45:05 +0000 Received: (at 60224) by debbugs.gnu.org; 11 Jan 2023 20:45:03 +0000 Received: from localhost ([127.0.0.1]:44000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFhy2-0007HF-DZ for submit@debbugs.gnu.org; Wed, 11 Jan 2023 15:45:03 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:45579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFhxx-0007Fo-GL for 60224@debbugs.gnu.org; Wed, 11 Jan 2023 15:44:58 -0500 Received: by mail-qt1-f173.google.com with SMTP id h21so14684663qta.12 for <60224@debbugs.gnu.org>; Wed, 11 Jan 2023 12:44:57 -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=Lmc+Cm3h+GlAjIgO1kqN6MREVXLlYyiwB3Js2tIQah8=; b=FlVwuLmicT9bjnGi7LLfa4jNRpVCsM9IF9TZGZ96GsoXQZK7XG6bMZymCtyKMA6OSW kTICF20eGOaCjQ4Ja9A35iF8SKvPhSqHNBWgsHkpENDqTpcs1/5m35it546L5HREbq5z JuIF6SYHMqRUSCpA2g5XB8po/X8tvcJWSGzN6dlFSMPTl7huCbrIStW10TynkTIqncEc wPDNUY61jnctECpURbmzlBfLlKo5eHEUjyxBgJoCNHpxoXIo6FYV+QAQgfKb9K7wCtQg 4HZyUr8fWTmiIJNoKyz/1RwyA8fdyndGmyLDODB1WOGCL+u7P3NQUjxcGzGIGkstuIQC EzXw== 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=Lmc+Cm3h+GlAjIgO1kqN6MREVXLlYyiwB3Js2tIQah8=; b=avU4zNdq1uFfAYqILGp2Ksf4VRj00RaBjrNk0vi7Z5HFFuBRNTfLEZohTLZ1I2f/tR c+vgHs0XSYvwTuSqYH93E01Yay8SspcpaiVMuE7OJsQfriAmmINRVPssDReCW3eFQURp bzx2MRc4n/WqEX2wbLqsMWP3W+m+6V7UoKNw2wI0xs1rh2yDs7bo2rEK1KRb5ovFcPAN /m3U1F318OM7IpKZ3LVbxXXh2nwVftAUm+soUtqkWChRE8PcNX1WiJ0G/3hWJ5RS9yHZ qOTN74sD+27b3+1IkJxEOX0cjrke14ambJIt0FWBusb4KmjTi9wp+omQrYAm6gARaEpR dfhA== X-Gm-Message-State: AFqh2krIIYbpPMFZ73ohGeeHZFfHKB7XYSvN6fOo61hV01Hfa1W/hKQT HCl/mBSAku0FLbkdAFLkcwDWc/CB+P2i0tL9 X-Google-Smtp-Source: AMrXdXsdC1aexFDyQVOmeTmgSMx/tC3bx48xo6Gsf7/E3U5IF2Msdt0AjeQ5CKCb7qY7/qogRwY7ow== X-Received: by 2002:ac8:4793:0:b0:3a8:1c63:7603 with SMTP id k19-20020ac84793000000b003a81c637603mr107317025qtq.57.1673469891856; Wed, 11 Jan 2023 12:44:51 -0800 (PST) Received: from localhost.localdomain (dsl-159-79.b2b2c.ca. [66.158.159.79]) by smtp.gmail.com with ESMTPSA id y15-20020a05620a0e0f00b006f7ee901674sm9581862qkm.2.2023.01.11.12.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 12:44:51 -0800 (PST) From: Maxim Cournoyer Date: Wed, 11 Jan 2023 15:44:24 -0500 Message-Id: <20230111204433.15305-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230111204433.15305-1-maxim.cournoyer@gmail.com> References: <20230111204433.15305-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=1673469979; a=rsa-sha256; cv=none; b=YZ81PauxGJ1Z9ljhckrGnIhzXGdPLG9gscd6KowO4X2hEfb+fd+pYYjlWvdNrMQQcOylQG twxgxlD3CweTUXSXJM5KQJYQVPDJOOAYR/sHBPlZ6uWBsraDwiYdfsTguGHqSueMwWHhpX mXh6Qx3m+TDxC/pBOYxSRjo5KmS5dERXiFCd8MofG3LlcF7IzPxi0t+vu3IOY7CSRJ3IMY PrHhfse+V1/BoHkgJ4vkwqcCfAp6iy6bwtVCSexsnLNprNd/zoFgGLLWAHF+VJKHGHImql PycVnql59IzdqOZpwuWp9knnk9Efd8MNDgqVLPzCp8NLZN4hKLmYma3mM4dPTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=FlVwuLmi; 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=1673469979; 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=Lmc+Cm3h+GlAjIgO1kqN6MREVXLlYyiwB3Js2tIQah8=; b=o03pEFMQNypGUT8EHZTamC8rbUMB1611qdmV2zMf/XUUCmZZM8yau4FW8WCZXhATDaJafe D1Deom2PBYNlp0bPlT0ZHnZhLXx1lcfXg08oLePj6K6SfFID/DKdcfOpvnHciOjE6Z6ULl Kqf8lairt6X+rwwHK1DX4oJqxNoO7dEFQPuS9poj2W8K1KNHdx+OBLmMoTrUQXUph978Vx gInNSTeLvQkP13ptev1PhuHQkTv/lb6YkpFKmGLxH3CHKu5MfZ1Ea8eMWP2IU/PwjzfAOX JJdcPzpAi0zeOqD2xohal5k1N5zzcpcsnUKDdIYU2KEE4iEE5X32RD1FGRh61Q== X-Migadu-Spam-Score: 0.00 X-Spam-Score: 0.00 X-Migadu-Queue-Id: 0FF05DB58 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=FlVwuLmi; 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: q0UgXZFal8JB * 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. --- (no changes since v3) Changes in v3: - Rename %current-target-system to %current-system in comment gnu/packages/bootloaders.scm | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 10750e0448..4a27a36d78 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -867,9 +867,11 @@ (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 () + ;; Note: %current-system is a *triplet*, unlike its + ;; name would suggest. + (string=? (%current-system) + (gnu-triplet->nix-system triplet))))) (package (inherit u-boot) (name (string-append "u-boot-" @@ -880,16 +882,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) @@ -906,7 +903,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