From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +PQpOXUComOn+AAAbAwnHQ (envelope-from ) for ; Tue, 20 Dec 2022 19:44:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YLQqOXUComMIKAAA9RJhRA (envelope-from ) for ; Tue, 20 Dec 2022 19:44:05 +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 A79522A502 for ; Tue, 20 Dec 2022 19:44:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7hSL-0008Bx-Ef; Tue, 20 Dec 2022 13:35:14 -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 1p7hSG-00089I-ST for guix-patches@gnu.org; Tue, 20 Dec 2022 13:35:09 -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 1p7hSC-0000CH-15 for guix-patches@gnu.org; Tue, 20 Dec 2022 13:35:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7hSB-0004JA-PT for guix-patches@gnu.org; Tue, 20 Dec 2022 13:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60224] [PATCH 3/9] gnu: make-uboot-package: Simplify build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Dec 2022 18:35: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: Maxim Cournoyer Received: via spool by 60224-submit@debbugs.gnu.org id=B60224.167156128916487 (code B ref 60224); Tue, 20 Dec 2022 18:35:03 +0000 Received: (at 60224) by debbugs.gnu.org; 20 Dec 2022 18:34:49 +0000 Received: from localhost ([127.0.0.1]:46467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hRx-0004Hl-A8 for submit@debbugs.gnu.org; Tue, 20 Dec 2022 13:34:49 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:37704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7hRr-0004Go-Lq for 60224@debbugs.gnu.org; Tue, 20 Dec 2022 13:34:44 -0500 Received: by mail-qt1-f169.google.com with SMTP id j16so11760606qtv.4 for <60224@debbugs.gnu.org>; Tue, 20 Dec 2022 10:34:43 -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=bBijlxiPp8kNZGoUWApCFIKp6OAc/lSDRtwgAKj0820=; b=A8P/eTtkWLtD98lsjK+PCMEzuaOmOkZ6kqL2uAjYunImJeAf/2KBe2+H3mgNigAVtk OapIBeEKHOe8gS+TQuh+GiAV2QXrmQRJJOF1JEUl/HoPUHGhi9+5zXMJxilYoM8Ys9t2 7InDtYtcGe41Wx6LJf3bFhnw/c+g/IjRvcijlCCi3H++qg3hCaZSZ1wOdChAcFRSookU VrulJJaU16+qbxlhHTi/Z0DdnM6kh90jMmxVowgPkZZ+Bqy9y7eUdTBYRArJGyyHbJ1U wIyh4IIiof9n1OzzslcqjhuuWazK3AOlfeOcLxwrNJ2A0c8gWZlDxyiwPhVf2R6eFRHa llLg== 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=bBijlxiPp8kNZGoUWApCFIKp6OAc/lSDRtwgAKj0820=; b=T25JR4poWHg4AaSFoE5lI5U5V8samu1lrhxKYrr54ITIqDksnzPgxHylEAQErXRWfD 4XCdcISqf9q3Do7nPmC7Fe5aalspvPoIeh4sjLgxzCcoGehrLqWJl64cUXuHeeEaAOc6 /oF1F84eMqk11VE5M2GEAUHOuWNHgBFV8uju/lpLGNmmD6nOqt5Xi92u4jdQE7lElejW /eRvAGdOA4VKILF/rQJjKsp/80r+XXhlC1FvJh4Mb9zYLvSerPCHf/XLoW377kAX+8S+ zvecTRwONS6X6nUw6Ho/DiPNHfAkqYQFYqbRzV2nzKZNERCo6A95640r2tjIM/Xx4t0p Xemw== X-Gm-Message-State: ANoB5plxHaE0fYJ+rRpi9SRJ8OlxQKisxH3cHqrPfsIFynf9S6ZD1cSY CSzGE1XcvS/UaSsaXXYSvsBx4BIWsYt0kOK5 X-Google-Smtp-Source: AA0mqf4HtSVYuzwufjWUtfCIsiIVrTwD3WvqO0HJkOWH1hM3eBUQ61KTYbN02rgclUxYIqL1eywLRA== X-Received: by 2002:ac8:6f16:0:b0:3a8:305f:2fb0 with SMTP id bs22-20020ac86f16000000b003a8305f2fb0mr34256644qtb.18.1671561278025; Tue, 20 Dec 2022 10:34:38 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1002]) by smtp.gmail.com with ESMTPSA id fv20-20020a05622a4a1400b003ab43dabfb1sm942795qtb.55.2022.12.20.10.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 10:34:37 -0800 (PST) From: Maxim Cournoyer Date: Tue, 20 Dec 2022 13:34:21 -0500 Message-Id: <20221220183427.31752-4-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220183427.31752-2-maxim.cournoyer@gmail.com> References: <20221220183427.31752-2-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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="A8P/eTtk"; 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-Seal: i=1; s=key1; d=yhetil.org; t=1671561845; a=rsa-sha256; cv=none; b=cVAQB+ZELaA4WOELS3iUAFjsHDUzEZm0D9G8XblVW+hismJKz5oGTm65sXM8l/fmVpJINX HMnu8VOAvypAxojj7WuUenKHM9+r4m3FgWsTp/S3ZpeSkMiUGlJU0qHQA+NGU4/mtI7zhp E6gwM7OooRC0Ih2DnY8m9ErBYkx2i02IPWRYipBvLYxXGPZ19jOp1uK9EcVXH/+WMLAQU0 2U1ODOw0tyinizJKM7dhJc53w7bXm/kFNjpJLnbVtbz1Cbp+271CRk8ALOgBO7N4X1OdLG ledvs8MuR/0aNPDWlmDhEaQpScZnO1k9oKDQroA1fs0Dz4kY5tliM7MD3WjboA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671561845; 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=bBijlxiPp8kNZGoUWApCFIKp6OAc/lSDRtwgAKj0820=; b=CkRLgOOudAJ9Dp8zHMncL/tK89I52nFkls00994sgPFkHrfM/AnDYGdqRwiShoh0l9CfmQ PxGR7+l6nELYL4THIi5Xdmrtkg/9kLvcvQLXuMWkKt4OjBjT1iYzBjoKbad1ARhx5JJRnC 5Rmscbx9gVsvpJMWbosppNqfC8JDIo4ZwNG93N602jD/jEo9yYkpjF7xU6OPthmcUOSvak 6g4X/6W87IM6qsyJTj4J+N2f1jOY3LSC5oaTae3YM2zP0Cja7E5TrcqS3j6oLNd+F0NMvt ++ByRin5ZFPVHITYOdsV9liS7t8kAfjfqr6nlZduRlrB8anVcGFwFJGEr1Qqnw== X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="A8P/eTtk"; 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-Migadu-Spam-Score: 4.60 X-Spam-Score: 4.60 X-Migadu-Queue-Id: A79522A502 X-TUID: rOB2dWRjJfvs * 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. --- 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 bc9f32c9aa..6893d12745 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -790,9 +790,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-target-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-" @@ -803,16 +805,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) @@ -829,7 +826,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