From patchwork Fri Sep 29 09:16:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 54402 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 47C5227BBE2; Fri, 29 Sep 2023 10:19:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED 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 68BAB27BBEA for ; Fri, 29 Sep 2023 10:19:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9do-0005tC-9g; Fri, 29 Sep 2023 05:18:32 -0400 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 1qm9dC-0005Tj-2E for guix-patches@gnu.org; Fri, 29 Sep 2023 05:17:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qm9d8-0003uN-MC for guix-patches@gnu.org; Fri, 29 Sep 2023 05:17:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qm9dL-0004lV-KU; Fri, 29 Sep 2023 05:18:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH 08/23] gnu: avr-libc: Convert to procedure. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Fri, 29 Sep 2023 09:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66263 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66263@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com X-Debbugs-Original-Xcc: efraim@flashner.co.il, vagrant@debian.org, maxim.cournoyer@gmail.com Received: via spool by 66263-submit@debbugs.gnu.org id=B66263.169597904718093 (code B ref 66263); Fri, 29 Sep 2023 09:18:03 +0000 Received: (at 66263) by debbugs.gnu.org; 29 Sep 2023 09:17:27 +0000 Received: from localhost ([127.0.0.1]:55191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9ck-0004hf-Mz for submit@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:27 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:50311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qm9cO-0004e0-2K for 66263@debbugs.gnu.org; Fri, 29 Sep 2023 05:17:10 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40537481094so142852485e9.0 for <66263@debbugs.gnu.org>; Fri, 29 Sep 2023 02:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1695979003; x=1696583803; darn=debbugs.gnu.org; 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=0T1YlvkTt4ZTTrG1komOFsRH2lm8bvYzKkzHy12r9go=; b=LyYDm75poVc2J1yY4KVjzxJ5sfz+/ZUxkAvXLDzgsyiZE63TaBXF13wo5lLklKMZ9u 9EEFHH7yeMON1r9xJ5KRKJvGOmjKJogs9IpIUDZ6wZ6Yu9OZfKxAaox15GCfhyqsFk8d 9viY253Fl+UHBeHe3A/MGSp3YWtTryrqymGhvoqGvj8neKd9M+pi9W/bUNxOi1NZ3KQM koPHj4A1DPyQxlrt2H7bxdCwoa0CfB+CEK5DnL3s3evchzDp/1lhUjO8a2Xk6V2YQNcR 1jrQAYTczbCUYGGvjngMO+Qss6rGBXWcp/bKEhdq+mEpQ2sPzkDAJsaIlwSxsGwJJ+EY v6bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695979003; x=1696583803; 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=0T1YlvkTt4ZTTrG1komOFsRH2lm8bvYzKkzHy12r9go=; b=jqwP+IhUaszOd5yiQeRPOFkqivqnG0WZ7z4yqK8X3co9ij8vnn1hUZ6WwzlIU5m6F3 jmLHwq7hFnSgUDSLypGe2mbdxvkIj4AdEWlA/cAMUJTzeNwwFNh1wpiungUbxqTLNxfg 8pcejSJ18kpUARmKTx7mNZOXVwVaF5J+8UQ7e/X9qQk2xMeDxQc4eNr7CVFeUay8KG47 HoGyMbWpuyS/F8CGHklblfgxAeOjblNmae25EkR3/WvF6vLDKYeTIUi4V309jJ/W1yUZ enF2ovP2JVIzEekZSaQzBqMxBH2EHCCJuoZLk4k16+pEyrucCnxn2o+vIY7/6B77EenK Ixnw== X-Gm-Message-State: AOJu0YxxDHRBMsVyzYY3+8OiqKdnf5jp0SlRjjhCtk38O1tZx2TwAOP+ vswbCaq3wijLojd1y1USxplMkdLs3dIB5BW5dFqztQ== X-Google-Smtp-Source: AGHT+IHzgcT0I7EKJsKBLS5LHM9yYVU9fCpmEbKQ2SrrP3wH/Wq+VsBZDlyoZ/pUbIic0BQUdooC8A== X-Received: by 2002:a05:600c:b5a:b0:406:3c2b:8639 with SMTP id k26-20020a05600c0b5a00b004063c2b8639mr3130801wmr.30.1695979003507; Fri, 29 Sep 2023 02:16:43 -0700 (PDT) Received: from omen15.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id k15-20020a7bc40f000000b004013797efb6sm1020933wmi.9.2023.09.29.02.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 02:16:43 -0700 (PDT) Date: Fri, 29 Sep 2023 11:16:12 +0200 Message-Id: <20230929091627.7820-8-jean@foundationdevices.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230929091627.7820-1-jean@foundationdevices.com> References: <20230929091627.7820-1-jean@foundationdevices.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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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/avr.scm (make-avr-libc): New procedure. * gnu/packages/avr.scm (avr-libc): Use make-avr-libc procedure. --- gnu/packages/avr.scm | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index ccce686010..df1523274b 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -34,7 +34,8 @@ (define-module (gnu packages avr) #:use-module (gnu packages check) #:use-module (gnu packages cross-base) #:use-module (gnu packages flashing-tools) - #:use-module (gnu packages gcc)) + #:use-module (gnu packages gcc) + #:export (make-avr-libc)) (define-public avr-binutils (package @@ -93,7 +94,9 @@ (define avr-gcc `(("gcc" ,gcc) ,@(package-native-inputs xgcc)))))) -(define avr-libc +(define* (make-avr-libc #:key + (xbinutils (cross-binutils "avr")) + (xgcc (cross-gcc "avr"))) (package (name "avr-libc") (version "2.0.0") @@ -106,10 +109,12 @@ (define avr-libc "15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj")))) (build-system gnu-build-system) (arguments - '(#:out-of-source? #t - #:configure-flags '("--host=avr"))) - (native-inputs `(("avr-binutils" ,avr-binutils) - ("avr-gcc" ,avr-gcc))) + (list #:target "avr" + + #:out-of-source? #t + + #:implicit-cross-inputs? #f)) + (native-inputs (list xbinutils xgcc)) (home-page "https://www.nongnu.org/avr-libc/") (synopsis "The AVR C Library") (description @@ -118,6 +123,8 @@ (define avr-libc (license (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt")))) +(define avr-libc (make-avr-libc)) + (define-public avr-toolchain ;; avr-libc checks the compiler version and passes "--enable-device-lib" for avr-gcc > 5.1.0. ;; It wouldn't install the library for atmega32u4 etc if we didn't use the corret avr-gcc.