From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YCzuKhXRZWV2AQEAG6o9tA:P1 (envelope-from ) for ; Tue, 28 Nov 2023 12:37:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YCzuKhXRZWV2AQEAG6o9tA (envelope-from ) for ; Tue, 28 Nov 2023 12:37:57 +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 630F560166 for ; Tue, 28 Nov 2023 12:37:57 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=foundationdevices.com header.s=google header.b=ASNfJp10; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701171477; a=rsa-sha256; cv=none; b=fCkL0FzGfQ2q9FdHtwxo9xtVyF94iRVE17lmUbqfhvF0OULzdoxVEwdAqUn2ROfe0L8vy4 bZiparmuwq5ikNGnC+sE5qrCOAvoYZjFlffF2HxfnHrRRez2nPLJG8rU5IeAKTKQy8xkUM gthWgGa5Z+8AXbprjNgiE3fyVEfY+xtZTuYj+7s7psa/tyBwG80bVIgJC3FuKtnDagInGP KMw6+FDwqWWWSjXUlRlAdT+DUnKHt3IxDyc8L0JSL6MTr0v3TkQ4xqGcuoBX7AIoR8ku1l GdmVeg/wJHJCPfURgAdqRFHcBfoEwuXc4NK+pz/lF4PpMZZLKsJ6lz+L2v0ElA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=foundationdevices.com header.s=google header.b=ASNfJp10; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701171477; h=from:from:sender:sender:reply-to: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=PROaheWZztY9j7D9fB143OtH1N48/1/C7SS6jKpx+fU=; b=N+tXphp1h9UVRBDlsloVTzhnNra+8UYbbDZiQShT9zPedqMxsbcs48BDFt5skfubCpQR2G m529e8iTIG9hTUFqSK3qoCmQ6Ru3Fn9sDoXeADrN04GTsWRbki7ekxVLWBHqzX0zw/MOGr Ukbj2PFydJ7+Cvkt+xqKaA1o3ZTQ+IoJkEx7zRwxgfwuA/DkFdjfGsielXXNxQiKSeVMij al3WpUmILZ2fDDHLhAocod05Ww6iTDehFTHkuXNbN1EVsoSCTQzby+1noDA53azYjS0M7H eQ8IqS+wsnuhgC2VAa64eRUsKlAXeCVFqJ9gxbtGUQNt1hoVtR1e69RCW/W/wA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7wOg-0006uc-Dt; Tue, 28 Nov 2023 06:36:58 -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 1r7wOe-0006tp-OL for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:56 -0500 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 1r7wOe-0008Ai-Fm for guix-patches@gnu.org; Tue, 28 Nov 2023 06:36:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r7wOl-0003Nz-AE for guix-patches@gnu.org; Tue, 28 Nov 2023 06:37:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66263] [PATCH v1 09/22] gnu: cross-libc: Add AVR Libc support. References: <20230929091333.7623-1-jean@foundationdevices.com> In-Reply-To: <20230929091333.7623-1-jean@foundationdevices.com> Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Nov 2023 11:37: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: moreinfo patch To: 66263@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 66263-submit@debbugs.gnu.org id=B66263.170117138912825 (code B ref 66263); Tue, 28 Nov 2023 11:37:03 +0000 Received: (at 66263) by debbugs.gnu.org; 28 Nov 2023 11:36:29 +0000 Received: from localhost ([127.0.0.1]:45622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wOC-0003KV-KI for submit@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:29 -0500 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:45244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r7wNx-0003Ir-Pd for 66263@debbugs.gnu.org; Tue, 28 Nov 2023 06:36:14 -0500 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c9b5c12898so5437771fa.2 for <66263@debbugs.gnu.org>; Tue, 28 Nov 2023 03:36:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1701171360; x=1701776160; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qzsgh1m64MMSYXEL7UcAU8mX8DT/3+2cA+G7YFVGhGo=; b=ASNfJp10unFL+ZvXvvXoldmbwQbmNIfaHZwDk0tG/86AzL7z+B46KW/0eQbcSkHJ3P b5u6tGnT8PY9u8C6W4/czjoeo9SVEEAP3evDrbh+tzx6lHrAmmTqfFtppV8pgjbWJ67+ ZFL2R6+Cp2XtQhVkFMTsmEjqqp+tLhj/c4qZnT62neRny9D1o6maXqlKRBci9n7noGhL SvEZw8RchDzwVPjRQ+o1Ivso8du1vrD9NC1P6hqvkk1qlWgLLWx8sm9CPUpyutBkmSt3 aKA/FMPBJURwEdlQbvoXch9/6S1U49qvficVMKsRDuqfc/LlNptOvLB91Ld0c1dLz0UT dQKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701171360; x=1701776160; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qzsgh1m64MMSYXEL7UcAU8mX8DT/3+2cA+G7YFVGhGo=; b=N0nImwi5F5pRTtc/ReH74qwBVYO9Plnv3KjZPJGBX1CptgPKquFo/SpwSga/1cue2q XUXqelGgZAWD0dQtDJt60+oSEbT9gWPNstKv8wSNWrh+mlltKvbiqRzwy8WosYxoUnpY iQdFH7PlCD5lhzUvyzW14Ni5NNf/oGI8YNR57In7hR9vnthtZjmwmGzxCm+VW2LfTwyu EFMuf9Yf61nKMeqGdHBJA8Iqq0NXlFVQa0Kr9KFama51eEtfTibPshsA7ozkHwsojtOA O/BSeXPAEl79q69ZkvipbjviElrc9OhUCIJkztaaTwVRO+9Lk7P5oZDgH4yYjbGwe8uF FDTg== X-Gm-Message-State: AOJu0YwfHlrqdS1CKh8Fju38LPuNncuZp++bcXIMGrqTZnZ/mVL1bFpS +Et4BE2FoTaNBu1EeBKBO3FWnfCgMSxDqwjZ/M0= X-Google-Smtp-Source: AGHT+IHfLMlhdTV5lDlzAliuj3JZM70VvSu/fsXDWTyegxGslBlsgZnP/HR9SA/gZj6JKnmsnYRQVg== X-Received: by 2002:a2e:1416:0:b0:2c9:98fd:9981 with SMTP id u22-20020a2e1416000000b002c998fd9981mr6070168ljd.42.1701171360761; Tue, 28 Nov 2023 03:36:00 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id f7-20020a05600c154700b0040b4cb14d40sm1848769wmg.19.2023.11.28.03.36.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 03:36:00 -0800 (PST) Date: Tue, 28 Nov 2023 12:34:52 +0100 Message-ID: <20231128113510.11214-9-jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches From: Jean-Pierre De Jesus DIAZ via Guix-patches via 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 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -6.13 X-Spam-Score: -6.13 X-Migadu-Queue-Id: 630F560166 X-TUID: jVFr3HZeXINn * gnu/packages/avr.scm (make-avr-libc/implementation) : Add avr target parameter and disable implicit cross inputs. : Rename avr-gcc and avr-binutils to cross-gcc and cross-binutils to keep consistency with gnu-build-system. * gnu/packages/cross-base.scm (cross-libc) [target-avr?]: Return AVR Libc package from `make-avr-libc`. Change-Id: I6b087946d1287a82fac61c48c513e7f2d2184794 --- gnu/packages/avr.scm | 21 ++++++++++++++------- gnu/packages/cross-base.scm | 4 ++++ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index ac09b799f3..fc87e4ea13 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -40,7 +40,8 @@ (define-module (gnu packages avr) #:use-module (gnu packages gcc) #:use-module (gnu packages llvm) #:use-module (gnu packages vim) - #:export (make-avr-toolchain)) + #:export (make-avr-libc + make-avr-toolchain)) ;;; Commentary: ;;; @@ -108,7 +109,10 @@ (define* (make-avr-gcc/implementation #:key (xgcc gcc)) (define make-avr-gcc (memoize make-avr-gcc/implementation)) -(define* (make-avr-libc/implementation #:key (xgcc gcc)) +(define* (make-avr-libc/implementation #:key + (xbinutils (cross-binutils "avr")) + (xgcc (cross-gcc "avr" + #:xbinutils xbinutils))) (package (name "avr-libc") (version "2.0.0") @@ -121,10 +125,13 @@ (define* (make-avr-libc/implementation #:key (xgcc gcc)) "15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj")))) (build-system gnu-build-system) (arguments - '(#:out-of-source? #t - #:configure-flags '("--host=avr"))) - (native-inputs `(("avr-binutils" ,(make-avr-binutils)) - ("avr-gcc" ,(make-avr-gcc #:xgcc xgcc)))) + '(#:target "avr" + #:out-of-source? #t + ;; Avoid including itself as this package is a target input and cannot + ;; use the normal cross compilation inputs. + #:implicit-cross-inputs? #f)) + (native-inputs `(("cross-binutils" ,xbinutils) + ("cross-gcc" ,xgcc))) (home-page "https://www.nongnu.org/avr-libc/") (synopsis "AVR C Library") (description @@ -138,7 +145,7 @@ (define make-avr-libc (define* (make-avr-toolchain/implementation #:key (xgcc gcc)) (let ((avr-binutils (make-avr-binutils)) - (avr-libc (make-avr-libc #:xgcc xgcc)) + (avr-libc (make-avr-libc #:xgcc (cross-gcc "avr" #:xgcc xgcc))) (avr-gcc (make-avr-gcc #:xgcc xgcc))) ;; 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 diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index fe33770c2a..d4a0de6f90 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -28,6 +28,7 @@ (define-module (gnu packages cross-base) #:use-module (gnu packages) + #:use-module (gnu packages avr) #:use-module (gnu packages gcc) #:use-module (gnu packages base) #:use-module (gnu packages linux) @@ -699,6 +700,9 @@ (define* (cross-libc* target '()) ,@(package-inputs libc) ;FIXME: static-bash ,@(package-native-inputs libc))))) + ((? target-avr?) + (make-avr-libc #:xbinutils xbinutils + #:xgcc xgcc)) (else #f))) -- 2.41.0