From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oMshGMYpsmPQUQAAbAwnHQ (envelope-from ) for ; Mon, 02 Jan 2023 01:48:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ENcpF8YpsmNROQEAG6o9tA (envelope-from ) for ; Mon, 02 Jan 2023 01:48:06 +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 171A63AA4D for ; Mon, 2 Jan 2023 01:48:05 +0100 (CET) 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 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=1672620486; a=rsa-sha256; cv=none; b=IkMqQ0zGhuYbvDga2aaikkn8twu7Eh/JmTkJXsRZXZJrsaa0XY/w0Ynm6QRwQOAWjXbQGX LwqvrjOrGZDbSUeWrq2uXxixUJd/H+meyqb9yIvcFDchNybdYAtnq9F9riY6meV9H0CbQS xF5lJcyFrUZ2EXQfg18NzIm7rNP0ZplPNlUNN2hGDCzxTxQzkN97yi5N7/ylBSLOvbFQsV hMrIAGy2dvhspFetEaZq3a6ZFUUNiIYQyLqW/I9KEz53tUlidWGdwfVzIcg7zeQTExb7m9 fpg8D8PrcfHvyOwGjk8UG19HPhnweJGUzHRlSSJPv/QyBXSHzFt8uuDZDy2JWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=G5vJmlXU; 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=1672620486; 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=pxJBSnUusmfLk6t4r6m2FBjlWz5z43FstgGDHSNcAOc=; b=PwziiKpNDHhldrS+OK2+efvUnTUk5No9euiOyupZmsokrgwoVysRzWxUcGfXpUBcPOIXTT mXQSyYKcdt0ZegGVl15Y/Tm4bh1crlJmux68fraH+E0f+YB/a6k2lO/hDC75MPP2cJvOzY R5zx9X7zRnUMupL2ZBpuO/sOE1VT0GDQOWByUGXl030hFIzPFekDmdrEGASaW+EzvtvuHA yicwwZxxfk4PjqkzQC+sxvNa3XOSTSIYoCnRribvaEpiDVB4bjLuBp6EMMXRR4M25GpXqD DsGk53Wi5RDFGZ19oLGM7O5thPTPWV+7ZcbxxrPJV1Q3gDAfgMkkbnb2OfNBHg== X-Spam-Score: -3.05 X-Migadu-Queue-Id: 171A63AA4D Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=G5vJmlXU; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.05 X-TUID: ZuJBMviAwTmb * 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)) -- 2.38.1