From patchwork Mon Jan 2 00:46:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45791 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 C9EE727BBED; Mon, 2 Jan 2023 00:48:06 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS 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 022D927BBE9 for ; Mon, 2 Jan 2023 00:48:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pC8yq-0001sm-Di; Sun, 01 Jan 2023 19:47:08 -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 1pC8yn-0001qw-Ce for guix-patches@gnu.org; Sun, 01 Jan 2023 19:47:05 -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 1pC8yn-0004Wn-4X for guix-patches@gnu.org; Sun, 01 Jan 2023 19:47:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pC8yl-0007H5-Pi for guix-patches@gnu.org; Sun, 01 Jan 2023 19:47:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60224] [PATCH v3 03/11] gnu: make-uboot-package: Simplify build. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Jan 2023 00:47: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 Received: via spool by 60224-submit@debbugs.gnu.org id=B60224.167262041827879 (code B ref 60224); Mon, 02 Jan 2023 00:47:03 +0000 Received: (at 60224) by debbugs.gnu.org; 2 Jan 2023 00:46:58 +0000 Received: from localhost ([127.0.0.1]:42063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC8yg-0007FW-Hh for submit@debbugs.gnu.org; Sun, 01 Jan 2023 19:46:58 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:36664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pC8yf-0007Et-JF for 60224@debbugs.gnu.org; Sun, 01 Jan 2023 19:46:58 -0500 Received: by mail-qt1-f179.google.com with SMTP id v14so18715588qtq.3 for <60224@debbugs.gnu.org>; Sun, 01 Jan 2023 16:46: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=pxJBSnUusmfLk6t4r6m2FBjlWz5z43FstgGDHSNcAOc=; b=G5vJmlXUi7QnW6lhBgHkxyt9L29urPGs/qM5NDFSuU1TeeS+r/Qw1hKyRBOjSM45Bo 5lSzpVLywq5cQPU7wuJuNckJKyQPOVDujUytYEPelsHVMkuTWFF+kKJFBlI6uHJXj6kD fL10xXJBnw8znRhIJaUrnf8fHp+CwHVYpy02KUhipUD8lLKt4Z2ZoB4IicBsGMo8YX1D Q59upzWTZtRq54TjUNJxB6mkGTD7MxrD9pkoD+ZqkOaHTrCIcLdUVx0i/Ivr9BOpHrBG lTTCX4+JdVY0k2Xy40STKP+DIJ1v5APt/7HNdU7o05gGmXiPVbvUJ6f0HqaLeOfe7YMb IOXw== 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=pxJBSnUusmfLk6t4r6m2FBjlWz5z43FstgGDHSNcAOc=; b=j5z4z6F7LzQBRPqlVCbZwLW6rl3YCeDXGRSV2u4LWY6fL4rcMXiAPoABPUL3vdivtX ToqSGBhjNiYtsCcqgTVNL1kzF03ohdDuIyAI0ZmwjS7EKWOQx66wpNnkXINmpGKj2qys bUSAGya7Enke8HAVbHYwfLs5U4cIgf4XxMwupAdWMFNZevWf80XwjzsFwrwkJD29fh+k E3y0BM8azp+NaRMca5BEExzUmG1i9mjpj70KJcigkKfLA/faOo1T2b7H1p0nlMjkpVFy 2R8/TSuPkRT5SuT1aS+QXwoiV1afDEcoXPuF6eOmVC7vKxQtxy0l9HvDK6dD5GoORmub V5Eg== X-Gm-Message-State: AFqh2kpagbl5EulFut9RP3hJPBxpbG7BLudn5BFsxNi6gNn2fsCN828t IImRMSUXTdq+9za1Y47qyhVcWTBgH3l/fQ== X-Google-Smtp-Source: AMrXdXtfT6b9P1JZCAkbePl0J5l0LyGpEA5TEU+PbdCMLEtQHGhkrhy1hWBamLPG9NCkQDTI6kFT7A== X-Received: by 2002:a05:622a:1e99:b0:3a8:2ccb:f55d with SMTP id bz25-20020a05622a1e9900b003a82ccbf55dmr59362072qtb.33.1672620411993; Sun, 01 Jan 2023 16:46:51 -0800 (PST) Received: from localhost.localdomain (dsl-10-148-224.b2b2c.ca. [72.10.148.224]) by smtp.gmail.com with ESMTPSA id h24-20020ac87458000000b003a7ef7a758dsm16788311qtr.59.2023.01.01.16.46.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Jan 2023 16:46:51 -0800 (PST) From: Maxim Cournoyer Date: Sun, 1 Jan 2023 19:46:28 -0500 Message-Id: <20230102004637.3920-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230102004637.3920-1-maxim.cournoyer@gmail.com> References: <20230102004637.3920-1-maxim.cournoyer@gmail.com> 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 * 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 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 75033c4def..c3c15d557a 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -862,9 +862,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-" @@ -875,16 +877,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) @@ -901,7 +898,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))