Received: (at 65860-done) by debbugs.gnu.org; 25 Sep 2023 17:58:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 25 13:58:51 2023 Received: from localhost ([127.0.0.1]:46599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qkpr8-0003Va-LY for submit <at> debbugs.gnu.org; Mon, 25 Sep 2023 13:58:50 -0400 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]:54405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qkpr4-0003VE-8A; Mon, 25 Sep 2023 13:58:49 -0400 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-65b0dad1f98so14948776d6.0; Mon, 25 Sep 2023 10:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695664708; x=1696269508; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=BCkrnQroar2FgpOW8eZz95NTBE+5aAi90fs3Mfhrt7c=; b=cZFZQy/W2lYize5cxK4QsvC0c4P5Qp9J4UiG1SAuMJxudGZoRfzjjCQaEEQVFh25fm 5ZRkwImCSpuUBn2rQTHKCzYLcwbgJ4r6XpwraM7kuyzNeefooPb5GpadTo+Fvg+5aRJ4 8U+Qa/SaFYQRqxh3rMQda3tn4kh8Zn0IcwYvUPrNada6+skN+55C93H45qj3zF1V1VM6 /vZ3C3oLPotQpu6IK4FcWAeMaQ+QXlO/Cfqx4zqgs4nex3EBvrxgOD4nMxa0w8vWXMI3 l407xib3qMDn8+c9UGn7Ixb4oOMhWPFlH0jvgw4wwNOwoa/srG5baXHeUviVH8alcu81 VG3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695664708; x=1696269508; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BCkrnQroar2FgpOW8eZz95NTBE+5aAi90fs3Mfhrt7c=; b=fzAUAWMTFe9zMxYtX2BzgFWQdlTUTF5iYl4jQ29UGCFkH+MqIFblQpUTUjn1my1nqk FzvlGCIvJQ3XOZeN/TU3WnUvqTLHFJHYNcDskvPF3DVURT6yEG2LDyARhx7Yc+Y5e8fG rQ3cH8fZLAXqArNnn5FUIPV60p5/UvEl65W5xC61EY1FoDfw94TXxAoDRZdoitnxwAIF P9+cHrvChYg55AO+Pbm+muK3UylV2RhClbF3eYGHQxYjd5umeg7X7XNyKbGeW0wh5NGZ ZbN41pTC7mqy3K/BeB3p6rh/fAfVupYIbh4eWLte+DXYqhDdP+/LPFmZ32z11H0yamLr gUIA== X-Gm-Message-State: AOJu0YxaD/Iows8n6UbUYcVQQSO0BSWUQ2CaIj6Nh4H6vse0fxhNwcHZ h+/mvooCfxyuqJU/RfAWBek= X-Google-Smtp-Source: AGHT+IEcmZL3t/CUSDwN91lBFoiy4xAI9kcaGET0NKLdnL8QPIUHoGW+mPyaXrBpCmddX2VnIGNLxg== X-Received: by 2002:a05:6214:2f0c:b0:658:2857:ed64 with SMTP id od12-20020a0562142f0c00b006582857ed64mr7671874qvb.18.1695664707982; Mon, 25 Sep 2023 10:58:27 -0700 (PDT) Received: from hurd (dsl-10-130-229.b2b2c.ca. [72.10.130.229]) by smtp.gmail.com with ESMTPSA id b19-20020a0ccd13000000b00646e0411e8csm1268296qvm.30.2023.09.25.10.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:58:27 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#66063: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> <87r0n1kedj.fsf_-_@HIDDEN> <8734zhv49z.fsf@HIDDEN> <87o7i5glwr.fsf@HIDDEN> <877coo715m.fsf@HIDDEN> Date: Mon, 25 Sep 2023 13:58:26 -0400 In-Reply-To: <877coo715m.fsf@HIDDEN> (Maxim Cournoyer's message of "Sun, 17 Sep 2023 20:52:53 -0400") Message-ID: <871qem2kzh.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860-done Cc: Ricardo Wurmus <rekado@HIDDEN>, 66063-done <at> debbugs.gnu.org, 65860-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > Hi Ludovic, > > Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > > [...] > >> I agree that this needs to be addressed. I wondered whether/how hard we >> should search for a different solution. > > OK. I think the current situation needs to be resolved ASAP, but longer > term I'm definitely willing to revisit our strategy when it comes to > cross compiler toolchains. > > [...] > >> BTW, another issue with the package-returning procedures: they return a >> fresh package object at each call, which defeats caching. I think you >> should be able to observe it with: >> >> GUIX_PROFILING=3Dobject-cache guix build axoloti-runtime -d --no-graf= ts >> >> The effect will be more acute on the build farms since they compute >> derivations for everything that depends on these toolchains. >> >> The solution would be to make those procedures memoizing, with =E2=80=98= mlambda=E2=80=99 >> or similar. > > I haven't tried measuring the impact, but I've use mlambda in the v2 > just sent; thanks for the suggesting it! I've now pushed this series. If we can make AVR a native target/platform in Guix, that may make things simpler/nicer, but otherwise, this is at least resolved. --=20 Thanks, Maxim
Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:Received: (at 65860-done) by debbugs.gnu.org; 25 Sep 2023 17:58:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 25 13:58:51 2023 Received: from localhost ([127.0.0.1]:46599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qkpr8-0003Va-LY for submit <at> debbugs.gnu.org; Mon, 25 Sep 2023 13:58:50 -0400 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]:54405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qkpr4-0003VE-8A; Mon, 25 Sep 2023 13:58:49 -0400 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-65b0dad1f98so14948776d6.0; Mon, 25 Sep 2023 10:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695664708; x=1696269508; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=BCkrnQroar2FgpOW8eZz95NTBE+5aAi90fs3Mfhrt7c=; b=cZFZQy/W2lYize5cxK4QsvC0c4P5Qp9J4UiG1SAuMJxudGZoRfzjjCQaEEQVFh25fm 5ZRkwImCSpuUBn2rQTHKCzYLcwbgJ4r6XpwraM7kuyzNeefooPb5GpadTo+Fvg+5aRJ4 8U+Qa/SaFYQRqxh3rMQda3tn4kh8Zn0IcwYvUPrNada6+skN+55C93H45qj3zF1V1VM6 /vZ3C3oLPotQpu6IK4FcWAeMaQ+QXlO/Cfqx4zqgs4nex3EBvrxgOD4nMxa0w8vWXMI3 l407xib3qMDn8+c9UGn7Ixb4oOMhWPFlH0jvgw4wwNOwoa/srG5baXHeUviVH8alcu81 VG3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695664708; x=1696269508; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=BCkrnQroar2FgpOW8eZz95NTBE+5aAi90fs3Mfhrt7c=; b=fzAUAWMTFe9zMxYtX2BzgFWQdlTUTF5iYl4jQ29UGCFkH+MqIFblQpUTUjn1my1nqk FzvlGCIvJQ3XOZeN/TU3WnUvqTLHFJHYNcDskvPF3DVURT6yEG2LDyARhx7Yc+Y5e8fG rQ3cH8fZLAXqArNnn5FUIPV60p5/UvEl65W5xC61EY1FoDfw94TXxAoDRZdoitnxwAIF P9+cHrvChYg55AO+Pbm+muK3UylV2RhClbF3eYGHQxYjd5umeg7X7XNyKbGeW0wh5NGZ ZbN41pTC7mqy3K/BeB3p6rh/fAfVupYIbh4eWLte+DXYqhDdP+/LPFmZ32z11H0yamLr gUIA== X-Gm-Message-State: AOJu0YxaD/Iows8n6UbUYcVQQSO0BSWUQ2CaIj6Nh4H6vse0fxhNwcHZ h+/mvooCfxyuqJU/RfAWBek= X-Google-Smtp-Source: AGHT+IEcmZL3t/CUSDwN91lBFoiy4xAI9kcaGET0NKLdnL8QPIUHoGW+mPyaXrBpCmddX2VnIGNLxg== X-Received: by 2002:a05:6214:2f0c:b0:658:2857:ed64 with SMTP id od12-20020a0562142f0c00b006582857ed64mr7671874qvb.18.1695664707982; Mon, 25 Sep 2023 10:58:27 -0700 (PDT) Received: from hurd (dsl-10-130-229.b2b2c.ca. [72.10.130.229]) by smtp.gmail.com with ESMTPSA id b19-20020a0ccd13000000b00646e0411e8csm1268296qvm.30.2023.09.25.10.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:58:27 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#66063: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> <87r0n1kedj.fsf_-_@HIDDEN> <8734zhv49z.fsf@HIDDEN> <87o7i5glwr.fsf@HIDDEN> <877coo715m.fsf@HIDDEN> Date: Mon, 25 Sep 2023 13:58:26 -0400 In-Reply-To: <877coo715m.fsf@HIDDEN> (Maxim Cournoyer's message of "Sun, 17 Sep 2023 20:52:53 -0400") Message-ID: <871qem2kzh.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860-done Cc: Ricardo Wurmus <rekado@HIDDEN>, 66063-done <at> debbugs.gnu.org, 65860-done <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Maxim Cournoyer <maxim.cournoyer@HIDDEN> writes: > Hi Ludovic, > > Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > > [...] > >> I agree that this needs to be addressed. I wondered whether/how hard we >> should search for a different solution. > > OK. I think the current situation needs to be resolved ASAP, but longer > term I'm definitely willing to revisit our strategy when it comes to > cross compiler toolchains. > > [...] > >> BTW, another issue with the package-returning procedures: they return a >> fresh package object at each call, which defeats caching. I think you >> should be able to observe it with: >> >> GUIX_PROFILING=3Dobject-cache guix build axoloti-runtime -d --no-graf= ts >> >> The effect will be more acute on the build farms since they compute >> derivations for everything that depends on these toolchains. >> >> The solution would be to make those procedures memoizing, with =E2=80=98= mlambda=E2=80=99 >> or similar. > > I haven't tried measuring the impact, but I've use mlambda in the v2 > just sent; thanks for the suggesting it! I've now pushed this series. If we can make AVR a native target/platform in Guix, that may make things simpler/nicer, but otherwise, this is at least resolved. --=20 Thanks, Maxim
Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 18 Sep 2023 00:53:12 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 20:53:11 2023 Received: from localhost ([127.0.0.1]:51691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qi2Vj-0002BF-JA for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:53:11 -0400 Received: from mail-qv1-xf2d.google.com ([2607:f8b0:4864:20::f2d]:46092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qi2Vh-0002B3-8M for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:53:10 -0400 Received: by mail-qv1-xf2d.google.com with SMTP id 6a1803df08f44-64cca551ae2so24564666d6.0 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 17:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694998375; x=1695603175; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=RBTQcmKHxXBgt0gcTNvBaEMqVqb/BEabuF8ZvFVTVko=; b=eFhNMhQdtCbxIc7Nggzo5tllyMt2ilCDycuuUM8/zXQZJ3ytrVYCBpe3GZcMpWMJMK WoQwaPwXJMMXjgKhTvGyum1mAGejsus7GNLE6p5tD1I925Wa9OqCTA1HMZHO4Evc/Xc3 ClhZ8zifXTZJ3rblCaZOcbypikDyejVmJTo23MWB4fxHu5G5aNdW2ijRb8smBJiKPJwZ uUeKl0ecq7jGUY9Rhft9PxNM/4hbCdJkZCHcNhnGE/Ly1lqxC6KPUfrJnHRTeIrbgNRJ D0WEDE80Q+AAPEkYgEWXcNKGTlByja5usqOjUJYVCVZ+ZcLC8z8/RNb3ds/h99E+2JKv Rzxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694998375; x=1695603175; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RBTQcmKHxXBgt0gcTNvBaEMqVqb/BEabuF8ZvFVTVko=; b=BJcNLzMR+qCGcWCLPttk7UP+XXV9BH32FWAXsyGGs+vxtejpgCYvrMjBesesuVvIDK 1T16K+TVq+mCdN+6EmTJqIua52p5RY7BPPZ3v105VmuZakkq/zS9dMOdy5F/e4FAXsMa XR7AdbdhRdzjqyj67hO04bEnwWCtbb/GUsmrNFFJ9KJyyUGZ4yH40duFme3wqv6Y982P mTbL8FB43Xpv3xaE/iwsbwFg0VQvb8dEUFgAMfKnn38QPB+Vo0sdjhIektGVd9uUAi4y 9Zbh4QQdCTwUdKA0bf5SB6+FV6wu9LEldJ53URjknoixwtTWwxoHHBLxXqK6cJYIel+8 tTSg== X-Gm-Message-State: AOJu0YxH/JEWxlxt5Z2VmFTXJqYg1TKR4GbS1+86Biijb1gLGG8ZUr6e ybZqVOxaFwMjD1t/64EAOWOJefK23GE= X-Google-Smtp-Source: AGHT+IH8jvYB6N7OlBZ42b+EbItuL5bZPVFLJwc5YJsEO7ibgCFYSlEwDoT6XF83o0vKccJt8kp/nQ== X-Received: by 2002:ad4:5012:0:b0:64f:6199:a8e with SMTP id s18-20020ad45012000000b0064f61990a8emr7449334qvo.23.1694998375490; Sun, 17 Sep 2023 17:52:55 -0700 (PDT) Received: from hurd (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id y9-20020a0cd989000000b0063d2a70dff5sm3056635qvj.72.2023.09.17.17.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 17:52:54 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65860: [PATCH 0/4] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> <87r0n1kedj.fsf_-_@HIDDEN> <8734zhv49z.fsf@HIDDEN> <87o7i5glwr.fsf@HIDDEN> Date: Sun, 17 Sep 2023 20:52:53 -0400 In-Reply-To: <87o7i5glwr.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Thu, 14 Sep 2023 11:10:44 +0200") Message-ID: <877coo715m.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: 65860 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: [...] > I agree that this needs to be addressed. I wondered whether/how hard we > should search for a different solution. OK. I think the current situation needs to be resolved ASAP, but longer term I'm definitely willing to revisit our strategy when it comes to cross compiler toolchains. [...] > BTW, another issue with the package-returning procedures: they return a > fresh package object at each call, which defeats caching. I think you > should be able to observe it with: > > GUIX_PROFILING=3Dobject-cache guix build axoloti-runtime -d --no-grafts > > The effect will be more acute on the build farms since they compute > derivations for everything that depends on these toolchains. > > The solution would be to make those procedures memoizing, with =E2=80=98m= lambda=E2=80=99 > or similar. I haven't tried measuring the impact, but I've use mlambda in the v2 just sent; thanks for the suggesting it! --=20 Thanks, Maxim
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 18 Sep 2023 00:44:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 20:44:05 2023 Received: from localhost ([127.0.0.1]:51678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qi2Mu-0001pq-Tv for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:44:05 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:52569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qi2Mp-0001oS-2S for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:59 -0400 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-414b3b65e85so26094361cf.1 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 17:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694997825; x=1695602625; 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=CmoiUvwzRQcw75LFnEMihCQ967PVYN5TYCCEpNfllyQ=; b=MXwB1CyiNaRJS2I7jRbMRjubw5LtPECa4COl6CnMqRSKV/jWhkGjLoRnwI2AP8aP/2 yGDT5sMUjkWt+OowRx6hm2p/V3Whwd7Mr/0onn81mGJLBKx+h29LNcxxk0gujryPNrGO LGLcGtLzI95O3TKu0i3UJ3kJDrrEW8epaE2yzV6YqR7wX2Tn6TT6JQbjDnbN0oSnuzXJ jBgM6vPTZLHMF/9x2ItdhOi+yxPDTiClp+STq53z720Jg8GwtGNk/x44rQv7t4N7cmWv vAnS6Ft0QDHivDG2Jguh2S5vUTKf/L7JspjaWzq+wAN80xfUW5Gkc7Qjs12b4gPjaNrn YtXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694997825; x=1695602625; 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=CmoiUvwzRQcw75LFnEMihCQ967PVYN5TYCCEpNfllyQ=; b=PMePR/nRBG8uH2pSK58mLh65/RXlO8P5djDvT2qbLGjpsViRosnnPU4bnKBAMjityp hVl1040V13HhgNc5u0LPpBWqmkKsIrWQHQgN5I3T2FlcE7CBFrMd5Z+GNGI+38qMUwRj 250ACC9PQehY1wV6NF/p0ouagS/KP5OT468tgZSbkbvVSQau16HQB30ag1zOJvIhd0l5 762ZJj6/dpH6996C/ejYGXP8TXmEzOYFCtA3tBNoOFs10ZL8LPwlzVd5EamYWRG9+mm1 L0ZsxMWiZyuu7VR0L3VgS8U2JMjs+57CWF6KZm9z1NPVzxOlgIjOIlLNvTWWSaW/ZKW3 aglA== X-Gm-Message-State: AOJu0YyxP+LARLi73QJyhVVwqvLkc2UyGxfeZ9hL9DsfP+h/0d5CH3fF w5aCLa3X52PbzbJMLfmn9gwJpjl2IrQ= X-Google-Smtp-Source: AGHT+IEdp9W6knVZwnemWm9ChAwDia54Q9PJAZaKJVB6Lnd51FF3y9x9FgrIoxmWjy7Gi+2kfHr3HA== X-Received: by 2002:a05:622a:50f:b0:411:5528:64f6 with SMTP id l15-20020a05622a050f00b00411552864f6mr9060870qtx.27.1694997825336; Sun, 17 Sep 2023 17:43:45 -0700 (PDT) Received: from localhost.localdomain (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id cr8-20020a05622a428800b00403f1a7be90sm2662547qtb.88.2023.09.17.17.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 17:43:44 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH v2 3/3] doc: Add new 'Circular Module Dependencies' section. Date: Sun, 17 Sep 2023 20:43:10 -0400 Message-ID: <c2b54357d9f705ce0d561f660139b7e7570f195e.1694997755.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694997755.git.maxim.cournoyer@HIDDEN> References: <cover.1694997755.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * doc/contributing.texi (Circular Module Dependencies): New subsection. --- (no changes since v1) doc/contributing.texi | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/doc/contributing.texi b/doc/contributing.texi index 156a6cb19e1..d99751f42cb 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -513,6 +513,7 @@ Packaging Guidelines * Version Numbers:: When the name is not enough. * Synopses and Descriptions:: Helping users find the right package. * Snippets versus Phases:: Whether to use a snippet, or a build phase. +* Cyclic Module Dependencies:: Going full circle. * Emacs Packages:: Your Elisp fix. * Python Modules:: A touch of British comedy. * Perl Modules:: Little pearls. @@ -784,6 +785,61 @@ Snippets versus Phases using build phases. Refer to the @code{origin} record documentation for more information (@pxref{origin Reference}). +@node Cyclic Module Dependencies +@subsection Cyclic Module Dependencies + +While there cannot be circular dependencies between packages, Guile's +lax module loading mechanism allows circular dependencies between Guile +modules, which doesn't cause problems as long as the following +conditions are followed for two modules part of a dependency cycle: + +@cindex rules to cope with circular module dependencies +@enumerate +@item +Macros are not shared between the co-dependent modules +@item +Top-level variables are only referenced in delayed (@i{thunked}) package +fields: @code{arguments}, @code{native-inputs}, @code{inputs}, +@code{propagated-inputs} or @code{replacement} +@item +Procedures referencing top-level variables from another module are not +called at the top level of a module themselves. +@end enumerate + +Straying away from the above rules may work while there are no +dependency cycles between modules, but given such cycles are confusing +and difficult to troubleshoot, it is best to follow the rules to avoid +introducing problems down the line. + +@noindent +Here is a common trap to avoid: + +@lisp +(define-public avr-binutils + (package + (inherit (cross-binutils "avr")) + (name "avr-binutils"))) +@end lisp + +In the above example, the @code{avr-binutils} package was defined in the +module @code{(gnu packages avr)}, and the @code{cross-binutils} +procedure in @code{(gnu packages cross-base)}. Because the +@code{inherit} field is not delayed (thunked), it is evaluated at the +top level at load time, which is problematic in the presence of module +dependency cycles. This could be resolved by turning the package into a +procedure instead, like: + +@lisp +(define (make-avr-binutils) + (package + (inherit (cross-binutils "avr")) + (name "avr-binutils"))) +@end lisp + +Care would need to be taken to ensure the above procedure is only ever +used in a package delayed fields or within another procedure also not +called at the top level. + @node Emacs Packages @subsection Emacs Packages -- 2.41.0
maxim.cournoyer@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 18 Sep 2023 00:44:02 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 20:44:02 2023 Received: from localhost ([127.0.0.1]:51670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qi2Mp-0001om-JU for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:44:02 -0400 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]:51495) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qi2Ml-0001oF-Ks for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:58 -0400 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-411f5dd7912so27053531cf.3 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 17:43:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694997822; x=1695602622; 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=YceUwOvZhcMmzMPEu3AXlYPaRmWJw1ZOBwqb9KcI1us=; b=Y6GhL5ESogGsyXnkog/E+YegZVpiIfM2qEWih6TQRrGAeMRjyeff+RwNq9kGgc0w/0 YW8neb6X/V0St+1KIEcqxDo0pDe7NvhbmCpx+T7EpkliU7zwJ5jDPqXVXV0V2WPqmLrL 84dZN91WdnPIbHNf+MEHVxWadxFloQSC5bcR5vN5HyDzJIn3npVnbzWrqqk9TGEioFBF 6vd9CZLX7Sujf9woQulLCnWxkHDEoUo4jwLsKOEoY6VvOqu01H2rJfR+UXumyxBMxfby EuZIiJciYC4YIZ+glC3sdaMjYhEwbNGb60B/VndXvRr7uvn5Eo98T12+CAGRd6x1lisb /83g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694997822; x=1695602622; 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=YceUwOvZhcMmzMPEu3AXlYPaRmWJw1ZOBwqb9KcI1us=; b=YrP9/knmoJ+p5gs0An2WnWF+ldPRzkuUEevUJIZWZn14IAXvKsHpeUbNZc2xwsYUMu Q6VTvgUUqKMDnHihZ4GRh5BSLeC72ORZUCY/aVL0zTcUHPfik0hI6jhlfRfBPWR7ztnD wjhku31xALhV5kOaJKa5ETCE6WrBokR/mLRhAd9dJO2tFQ30Q+EbnuSg5iYrzM/g3ZGm YzcBgAbQryzcqVQcwnMQUfQnSexeHMDb8LbaupyOYsvOvjzvfRvb4kfNRuiSFoNX95QM +qgw2cpDK4UexwxcvloYnkt4xaKWPqhhLEa1NSaF8xijlok1scfQD0/IKp4A++NCGCs8 enIQ== X-Gm-Message-State: AOJu0YwL9qwLRWSneuWc3pav1UyZDfWyRMZKIG9a9ldgPZFAeRD4rgZy 68CdONEtgfXoGepVT2g3nCV0iPnVaWM= X-Google-Smtp-Source: AGHT+IF7HBXSQIk9OPpeD7SMmkYkVBMaoZiZQWVeK6fCCg/dYKxKgyg/yL7dGWXyMwArae1rVHsAhA== X-Received: by 2002:ac8:5849:0:b0:410:60a4:ffc7 with SMTP id h9-20020ac85849000000b0041060a4ffc7mr11454581qth.10.1694997821451; Sun, 17 Sep 2023 17:43:41 -0700 (PDT) Received: from localhost.localdomain (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id cr8-20020a05622a428800b00403f1a7be90sm2662547qtb.88.2023.09.17.17.43.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 17:43:40 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH v2 2/3] gnu: embedded: Turn packages using top-level variables into procedures. Date: Sun, 17 Sep 2023 20:43:09 -0400 Message-ID: <a54f810ef408b3a91cf6d1b0b1c81380b4fea0b7.1694997755.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694997755.git.maxim.cournoyer@HIDDEN> References: <cover.1694997755.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Fixes <https://issues.guix.gnu.org/65716>. Before this change, simply adding the following import: modified gnu/packages/firmware.scm @@ -42,6 +42,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages assembly) + #:use-module (gnu packages avr) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) Would cause byte compilation and/or evaluation to fail due to a circular module dependency. * gnu/packages/embedded.scm: Add commentary. (gcc-arm-none-eabi-4.9, gcc-arm-none-eabi-6, newlib-arm-none-eabi) (newlib-nano-arm-none-eabi, gcc-arm-none-eabi-7-2018-q2-update) (newlib-arm-none-eabi-7-2018-q2-update) (newlib-nano-arm-none-eabi-7-2018-q2-update) (arm-none-eabi-toolchain-4.9, arm-none-eabi-nano-toolchain-4.9) (arm-none-eabi-toolchain-6, arm-none-eabi-nano-toolchain-6) (arm-none-eabi-toolchain-7-2018-q2-update, gdb-arm-none-eabi) (propeller-binutils, propeller-gcc-6, propeller-gcc-4) (propeller-gcc, propeller-toolchain, propeller-development-suite) (gcc-vc4): Turn into procedures, prefixing the procedure name with 'make-', and adjust all users. (make-libstdc++-arm-none-eabi) [arguments]: Avoid an unused warning. (arm-none-eabi-toolchain): Rename to... (make-arm-none-eabi-toolchain): ... this. * gnu/packages/raspberry-pi.scm (raspi-arm-chainloader) [native-inputs]: Replace gcc-arm-none-eabi-6 with (make-arm-none-eabi-toolchain). * gnu/packages/axoloti.scm (axoloti-runtime) [inputs]: Replace arm-none-eabi-nano-toolchain-4.9 with (make-arm-none-eabi-nano-toolchain-4.9). (axoloti-patcher): Likewise. (axoloti-patcher-next) [inputs]: Replace arm-none-eabi-nano-toolchain-7-2018-q2-update with (make-arm-none-eabi-nano-toolchain-7-2018-q2-update). --- Changes in v2: - Use mlambda for procedures gnu/packages/axoloti.scm | 6 +- gnu/packages/embedded.scm | 1227 ++++++++++++++++++--------------- gnu/packages/raspberry-pi.scm | 2 +- 3 files changed, 663 insertions(+), 572 deletions(-) diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm index e0dd22c627c..7b369228603 100644 --- a/gnu/packages/axoloti.scm +++ b/gnu/packages/axoloti.scm @@ -199,7 +199,7 @@ (define-public axoloti-runtime ;; for compiling patches ("make" ,gnu-make) ;; for compiling firmware - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-4.9) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-4.9)) ;; for uploading compiled patches and firmware ("dfu-util" ,dfu-util-for-axoloti))) (native-inputs @@ -339,7 +339,7 @@ (define-public axoloti-patcher (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (inputs `(("icedtea" ,icedtea "jdk") - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-4.9) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-4.9)) ("java-simple-xml" ,java-simple-xml) ("java-rsyntaxtextarea" ,java-rsyntaxtextarea) ("java-usb4java" ,java-usb4java) @@ -572,7 +572,7 @@ (define-public axoloti-patcher-next (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (inputs `(("jdk" ,icedtea "jdk") - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-7-2018-q2-update) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-7-2018-q2-update)) ;; for compiling patches ("make" ,gnu-make) ;; for uploading compiled patches and firmware diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 325013a627c..42abd3398f0 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2020, 2021, 2022 Simon South <simon@HIDDEN> ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@HIDDEN> ;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@HIDDEN> ;;; ;;; This file is part of GNU Guix. @@ -34,6 +34,7 @@ (define-module (gnu packages embedded) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) + #:use-module (guix memoization) #:use-module (guix svn-download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) @@ -73,442 +74,519 @@ (define-module (gnu packages embedded) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages xorg) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (make-gcc-arm-none-eabi-4.9 + make-gcc-arm-none-eabi-6 + make-gcc-arm-none-eabi-7-2018-q2-update + + make-gcc-vc4 + + make-newlib-arm-none-eabi + make-newlib-arm-none-eabi-7-2018-q2-update + + make-newlib-nano-arm-none-eabi + make-newlib-nano-arm-none-eabi-7-2018-q2-update + + make-arm-none-eabi-toolchain-4.9 + make-arm-none-eabi-toolchain-6 + make-arm-none-eabi-toolchain-7-2018-q2-update + + make-arm-none-eabi-nano-toolchain-4.9 + make-arm-none-eabi-nano-toolchain-6 + make-arm-none-eabi-nano-toolchain-7-2018-q2-update + + make-gdb-arm-none-eabi + + make-propeller-gcc + make-propeller-gcc-4 + make-propeller-gcc-6 + make-propeller-toolchain + make-propeller-development-suite)) + +;;; Commentary: +;;; +;;; This modules contains toolchain generators as well as packages for use in +;;; embedded contexts. Note: the toolchain and specialized packages are +;;; procedures, so as to delay their references to top level bindings such as +;;; 'gcc' or 'cross-gcc', etc. +;;; ;; We must not use the released GCC sources here, because the cross-compiler ;; does not produce working binaries. Instead we take the very same SVN ;; revision from the branch that is used for a release of the "GCC ARM ;; embedded" project on launchpad. ;; See https://launchpadlibrarian.net/218827644/release.txt -(define-public gcc-arm-none-eabi-4.9 - (let ((xgcc (cross-gcc "arm-none-eabi" - #:xgcc gcc-4.9 - #:xbinutils (cross-binutils "arm-none-eabi"))) - (revision "1") - (svn-revision 227977)) - (package (inherit xgcc) - (version (string-append (package-version xgcc) "-" - revision "." (number->string svn-revision))) - (source - (origin - (method svn-fetch) - (uri (svn-reference - (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_9-branch/") - (revision svn-revision))) - (file-name (string-append "gcc-arm-embedded-" version "-checkout")) - (sha256 - (base32 - "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr")) +(define make-gcc-arm-none-eabi-4.9 + (mlambda () + (let ((xgcc (cross-gcc "arm-none-eabi" + #:xgcc gcc-4.9 + #:xbinutils (cross-binutils "arm-none-eabi"))) + (revision "1") + (svn-revision 227977)) + (package + (inherit xgcc) + (version (string-append (package-version xgcc) "-" + revision "." (number->string svn-revision))) + (source + (origin + (method svn-fetch) + (uri (svn-reference + (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/\ +embedded-4_9-branch/") + (revision svn-revision))) + (file-name (string-append "gcc-arm-embedded-" version "-checkout")) + (sha256 + (base32 + "113r98kygy8rrjfv2pd3z6zlfzbj543pq7xyq8bgh72c608mmsbr")) - (patches (cons (search-patch "gcc-4.9-inline.patch") - ;; Remove the one patch that doesn't apply to this 4.9 - ;; snapshot (the patch is for 4.9.4 and later but this - ;; svn snapshot is older). - (remove (lambda (patch) - (string=? (basename patch) - "gcc-arm-bug-71399.patch")) - (origin-patches (package-source xgcc))))))) - (native-inputs - `(("flex" ,flex) - ("gcc@5" ,gcc-5) - ,@(package-native-inputs xgcc))) - (arguments - (substitute-keyword-arguments (package-arguments xgcc) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Remove the default compiler from CPLUS_INCLUDE_PATH to - ;; prevent header conflict with the GCC from native-inputs. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH"))))) - (add-after 'unpack 'fix-genmultilib - (lambda _ - (substitute* "gcc/genmultilib" - (("#!/bin/sh") (string-append "#!" (which "sh")))))))) - ((#:configure-flags flags) - ;; The configure flags are largely identical to the flags used by the - ;; "GCC ARM embedded" project. - #~(append (list "--enable-multilib" - "--with-newlib" - "--with-multilib-list=armv6-m,armv7-m,armv7e-m" - "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" - "--enable-plugins" - "--disable-decimal-float" - "--disable-libffi" - "--disable-libgomp" - "--disable-libmudflap" - "--disable-libquadmath" - "--disable-libssp" - "--disable-libstdcxx-pch" - "--disable-nls" - "--disable-shared" - "--disable-threads" - "--disable-tls") - (delete "--disable-multilib" #$flags))))) - (native-search-paths - (list (search-path-specification - (variable "CROSS_C_INCLUDE_PATH") - (files '("arm-none-eabi/include"))) - (search-path-specification - (variable "CROSS_CPLUS_INCLUDE_PATH") - (files '("arm-none-eabi/include" - "arm-none-eabi/include/c++" - "arm-none-eabi/include/c++/arm-none-eabi"))) - (search-path-specification - (variable "CROSS_LIBRARY_PATH") - (files '("arm-none-eabi/lib")))))))) + (patches (cons (search-patch "gcc-4.9-inline.patch") + ;; Remove the one patch that doesn't apply to this + ;; 4.9 snapshot (the patch is for 4.9.4 and later + ;; but this svn snapshot is older). + (remove (lambda (patch) + (string=? (basename patch) + "gcc-arm-bug-71399.patch")) + (origin-patches (package-source xgcc))))))) + (native-inputs + `(("flex" ,flex) + ("gcc@5" ,gcc-5) + ,@(package-native-inputs xgcc))) + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Remove the default compiler from CPLUS_INCLUDE_PATH + ;; to prevent header conflict with the GCC from + ;; native-inputs. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH"))))) + (add-after 'unpack 'fix-genmultilib + (lambda _ + (substitute* "gcc/genmultilib" + (("#!/bin/sh") (string-append "#!" (which "sh")))))))) + ((#:configure-flags flags) + ;; The configure flags are largely identical to the flags used by the + ;; "GCC ARM embedded" project. + #~(append (list "--enable-multilib" + "--with-newlib" + "--with-multilib-list=armv6-m,armv7-m,armv7e-m" + "--with-host-libstdcxx=-static-libgcc \ +-Wl,-Bstatic,-lstdc++,-Bdynamic -lm" + "--enable-plugins" + "--disable-decimal-float" + "--disable-libffi" + "--disable-libgomp" + "--disable-libmudflap" + "--disable-libquadmath" + "--disable-libssp" + "--disable-libstdcxx-pch" + "--disable-nls" + "--disable-shared" + "--disable-threads" + "--disable-tls") + (delete "--disable-multilib" #$flags))))) + (native-search-paths + (list (search-path-specification + (variable "CROSS_C_INCLUDE_PATH") + (files '("arm-none-eabi/include"))) + (search-path-specification + (variable "CROSS_CPLUS_INCLUDE_PATH") + (files '("arm-none-eabi/include" + "arm-none-eabi/include/c++" + "arm-none-eabi/include/c++/arm-none-eabi"))) + (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files '("arm-none-eabi/lib"))))))))) -(define-public gcc-arm-none-eabi-6 - (package - (inherit gcc-arm-none-eabi-4.9) - (version (package-version gcc-6)) - (source (origin (inherit (package-source gcc-6)) - (patches - (append - (origin-patches (package-source gcc-6)) - (search-patches "gcc-6-cross-environment-variables.patch" - "gcc-6-arm-none-eabi-multilib.patch"))))))) +(define make-gcc-arm-none-eabi-6 + (mlambda () + (package + (inherit (make-gcc-arm-none-eabi-4.9)) + (version (package-version gcc-6)) + (source (origin + (inherit (package-source gcc-6)) + (patches + (append + (origin-patches (package-source gcc-6)) + (search-patches "gcc-6-cross-environment-variables.patch" + "gcc-6-arm-none-eabi-multilib.patch")))))))) -(define-public newlib-arm-none-eabi - (package - (name "newlib") - (version "2.4.0") - (source (origin - (method url-fetch) - (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-" - version ".tar.gz")) - (sha256 - (base32 - "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl")))) - (build-system gnu-build-system) - (arguments - `(#:out-of-source? #t - ;; The configure flags are identical to the flags used by the "GCC ARM - ;; embedded" project. - #:configure-flags '("--target=arm-none-eabi" - "--enable-newlib-io-long-long" - "--enable-newlib-register-fini" - "--disable-newlib-supplied-syscalls" - "--disable-nls") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-references-to-/bin/sh - (lambda _ - (substitute* '("libgloss/arm/cpu-init/Makefile.in" - "libgloss/arm/Makefile.in" - "libgloss/libnosys/Makefile.in" - "libgloss/Makefile.in") - (("/bin/sh") (which "sh"))) - #t))))) - (native-inputs - `(("xbinutils" ,(cross-binutils "arm-none-eabi")) - ("xgcc" ,gcc-arm-none-eabi-4.9) - ("texinfo" ,texinfo))) - (home-page "https://www.sourceware.org/newlib/") - (synopsis "C library for use on embedded systems") - (description "Newlib is a C library intended for use on embedded +(define make-newlib-arm-none-eabi + (mlambda () + (package + (name "newlib") + (version "2.4.0") + (source (origin + (method url-fetch) + (uri (string-append "ftp://sourceware.org/pub/newlib/newlib-" + version ".tar.gz")) + (sha256 + (base32 + "01i7qllwicf05vsvh39qj7qp5fdifpvvky0x95hjq39mbqiksnsl")))) + (build-system gnu-build-system) + (arguments + `(#:out-of-source? #t + ;; The configure flags are identical to the flags used by the "GCC ARM + ;; embedded" project. + #:configure-flags '("--target=arm-none-eabi" + "--enable-newlib-io-long-long" + "--enable-newlib-register-fini" + "--disable-newlib-supplied-syscalls" + "--disable-nls") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-references-to-/bin/sh + (lambda _ + (substitute* '("libgloss/arm/cpu-init/Makefile.in" + "libgloss/arm/Makefile.in" + "libgloss/libnosys/Makefile.in" + "libgloss/Makefile.in") + (("/bin/sh") (which "sh"))) + #t))))) + (native-inputs + `(("xbinutils" ,(cross-binutils "arm-none-eabi")) + ("xgcc" ,(make-gcc-arm-none-eabi-4.9)) + ("texinfo" ,texinfo))) + (home-page "https://www.sourceware.org/newlib/") + (synopsis "C library for use on embedded systems") + (description "Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts that are easily usable on embedded products.") - (license (license:non-copyleft - "https://www.sourceware.org/newlib/COPYING.NEWLIB")))) + (license (license:non-copyleft + "https://www.sourceware.org/newlib/COPYING.NEWLIB"))))) -(define-public newlib-nano-arm-none-eabi - (package (inherit newlib-arm-none-eabi) - (name "newlib-nano") - (arguments - (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi) - ;; The configure flags are identical to the flags used by the "GCC ARM - ;; embedded" project. They optimize newlib for use on small embedded - ;; systems with limited memory. - ((#:configure-flags flags) - ''("--target=arm-none-eabi" - "--enable-multilib" - "--disable-newlib-supplied-syscalls" - "--enable-newlib-reent-small" - "--disable-newlib-fvwrite-in-streamio" - "--disable-newlib-fseek-optimization" - "--disable-newlib-wide-orient" - "--enable-newlib-nano-malloc" - "--disable-newlib-unbuf-stream-opt" - "--enable-lite-exit" - "--enable-newlib-global-atexit" - "--enable-newlib-nano-formatted-io" - "--disable-nls")) - ((#:phases phases) - `(modify-phases ,phases - ;; XXX: Most arm toolchains offer both *.a and *_nano.a as newlib - ;; and newlib-nano respectively. The headers are usually - ;; arm-none-eabi/include/newlib.h for newlib and - ;; arm-none-eabi/include/newlib-nano/newlib.h for newlib-nano. We - ;; have two different toolchain packages for each which works but - ;; is a little strange. - (add-after 'install 'hardlink-newlib - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; The nano.specs file says that newlib-nano files should end - ;; in "_nano.a" instead of just ".a". Note that this applies - ;; to all the multilib folders too. - (for-each - (lambda (file) - (link file - (string-append - ;; Strip ".a" off the end - (substring file 0 (- (string-length file) 2)) - ;; Add "_nano.a" onto the end - "_nano.a"))) - (find-files - out - "^(libc.a|libg.a|librdimon.a|libstdc\\+\\+.a|libsupc\\+\\+.a)$")) +(define make-newlib-nano-arm-none-eabi + (mlambda () + (let ((base (make-newlib-arm-none-eabi))) + (package + (inherit base) + (name "newlib-nano") + (arguments + (substitute-keyword-arguments (package-arguments base) + ;; The configure flags are identical to the flags used by the "GCC + ;; ARM embedded" project. They optimize newlib for use on small + ;; embedded systems with limited memory. + ((#:configure-flags _) + ''("--target=arm-none-eabi" + "--enable-multilib" + "--disable-newlib-supplied-syscalls" + "--enable-newlib-reent-small" + "--disable-newlib-fvwrite-in-streamio" + "--disable-newlib-fseek-optimization" + "--disable-newlib-wide-orient" + "--enable-newlib-nano-malloc" + "--disable-newlib-unbuf-stream-opt" + "--enable-lite-exit" + "--enable-newlib-global-atexit" + "--enable-newlib-nano-formatted-io" + "--disable-nls")) + ((#:phases phases) + `(modify-phases ,phases + ;; XXX: Most arm toolchains offer both *.a and *_nano.a as + ;; newlib and newlib-nano respectively. The headers are + ;; usually arm-none-eabi/include/newlib.h for newlib and + ;; arm-none-eabi/include/newlib-nano/newlib.h for newlib-nano. + ;; We have two different toolchain packages for each which + ;; works but is a little strange. + (add-after 'install 'hardlink-newlib + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; The nano.specs file says that newlib-nano files should + ;; end in "_nano.a" instead of just ".a". Note that this + ;; applies to all the multilib folders too. + (for-each + (lambda (file) + (link file + (string-append + ;; Strip ".a" off the end + (substring file 0 (- (string-length file) 2)) + ;; Add "_nano.a" onto the end + "_nano.a"))) + (find-files + out + "^(libc.a|libg.a|librdimon.a|libstdc\\+\\+.a|\ +libsupc\\+\\+.a)$")) - ;; newlib.h is usually in this location instead so both - ;; newlib and newlib-nano can be in the toolchain at the same - ;; time - (mkdir (string-append out "/arm-none-eabi/include/newlib-nano")) - (symlink - "../newlib.h" - (string-append out "/arm-none-eabi/include/newlib-nano/newlib.h")) - #t))))))) - (synopsis "Newlib variant for small systems with limited memory"))) + ;; newlib.h is usually in this location instead so both + ;; newlib and newlib-nano can be in the toolchain at the + ;; same time + (mkdir (string-append + out "/arm-none-eabi/include/newlib-nano")) + (symlink + "../newlib.h" + (string-append + out + "/arm-none-eabi/include/newlib-nano/newlib.h"))))))))) + (synopsis "Newlib variant for small systems with limited memory"))))) ;;; The following definitions are for the "7-2018-q2-update" variant of the ;;; ARM cross toolchain as offered on https://developer.arm.com -(define-public gcc-arm-none-eabi-7-2018-q2-update - (let ((xgcc (cross-gcc "arm-none-eabi" - #:xgcc gcc-7 - #:xbinutils (cross-binutils "arm-none-eabi"))) - (revision "1") - (svn-revision 261907)) - (package (inherit xgcc) - (version (string-append "7-2018-q2-update-" - revision "." (number->string svn-revision))) - (source - (origin - (method svn-fetch) - (uri (svn-reference - (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-branch/") - (revision svn-revision))) - (file-name (string-append "gcc-arm-embedded-" version "-checkout")) - (sha256 - (base32 - "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5")) - (patches - (append - (origin-patches (package-source gcc-7)) - (search-patches "gcc-7-cross-environment-variables.patch"))))) - (native-inputs - (modify-inputs (package-native-inputs xgcc) - (delete "isl") - (prepend flex isl-0.18))) - (arguments - (substitute-keyword-arguments (package-arguments xgcc) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'unpack 'expand-version-string - (lambda _ - (make-file-writable "gcc/DEV-PHASE") - (with-output-to-file "gcc/DEV-PHASE" - (lambda () - (display "7-2018-q2-update"))))) - (add-after 'unpack 'fix-genmultilib - (lambda _ - (substitute* "gcc/genmultilib" - (("#!/bin/sh") (string-append "#!" (which "sh")))))) - (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Remove the default compiler from CPLUS_INCLUDE_PATH to - ;; prevent header conflict with the GCC from native-inputs. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH"))))))) - ((#:configure-flags flags) - ;; The configure flags are largely identical to the flags used by the - ;; "GCC ARM embedded" project. - #~(append (list "--enable-multilib" - "--with-newlib" - "--with-multilib-list=rmprofile" - "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" - "--enable-plugins" - "--disable-decimal-float" - "--disable-libffi" - "--disable-libgomp" - "--disable-libmudflap" - "--disable-libquadmath" - "--disable-libssp" - "--disable-libstdcxx-pch" - "--disable-nls" - "--disable-shared" - "--disable-threads" - "--disable-tls") - (delete "--disable-multilib" #$flags))))) - (native-search-paths - (list (search-path-specification - (variable "CROSS_C_INCLUDE_PATH") - (files '("arm-none-eabi/include"))) - (search-path-specification - (variable "CROSS_CPLUS_INCLUDE_PATH") - (files '("arm-none-eabi/include" - "arm-none-eabi/include/c++" - "arm-none-eabi/include/c++/arm-none-eabi"))) - (search-path-specification - (variable "CROSS_LIBRARY_PATH") - (files '("arm-none-eabi/lib")))))))) +(define make-gcc-arm-none-eabi-7-2018-q2-update + (mlambda () + (let ((xgcc (cross-gcc "arm-none-eabi" + #:xgcc gcc-7 + #:xbinutils (cross-binutils "arm-none-eabi"))) + (revision "1") + (svn-revision 261907)) + (package (inherit xgcc) + (version (string-append "7-2018-q2-update-" + revision "." + (number->string svn-revision))) + (source + (origin + (method svn-fetch) + (uri (svn-reference + (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/\ +embedded-7-branch/") + (revision svn-revision))) + (file-name (string-append "gcc-arm-embedded-" version + "-checkout")) + (sha256 + (base32 + "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5")) + (patches + (append + (origin-patches (package-source gcc-7)) + (search-patches + "gcc-7-cross-environment-variables.patch"))))) + (native-inputs + (modify-inputs (package-native-inputs xgcc) + (delete "isl") + (prepend flex isl-0.18))) + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'expand-version-string + (lambda _ + (make-file-writable "gcc/DEV-PHASE") + (with-output-to-file "gcc/DEV-PHASE" + (lambda () + (display "7-2018-q2-update"))))) + (add-after 'unpack 'fix-genmultilib + (lambda _ + (substitute* "gcc/genmultilib" + (("#!/bin/sh") + (string-append "#!" (which "sh")))))) + (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Remove the default compiler from + ;; CPLUS_INCLUDE_PATH to prevent header conflict + ;; with the GCC from native-inputs. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split + (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH'\ + changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH"))))))) + ((#:configure-flags flags) + ;; The configure flags are largely identical to the flags + ;; used by the "GCC ARM embedded" project. + #~(append (list "--enable-multilib" + "--with-newlib" + "--with-multilib-list=rmprofile" + "--with-host-libstdcxx=-static-libgcc \ +-Wl,-Bstatic,-lstdc++,-Bdynamic -lm" + "--enable-plugins" + "--disable-decimal-float" + "--disable-libffi" + "--disable-libgomp" + "--disable-libmudflap" + "--disable-libquadmath" + "--disable-libssp" + "--disable-libstdcxx-pch" + "--disable-nls" + "--disable-shared" + "--disable-threads" + "--disable-tls") + (delete "--disable-multilib" #$flags))))) + (native-search-paths + (list (search-path-specification + (variable "CROSS_C_INCLUDE_PATH") + (files '("arm-none-eabi/include"))) + (search-path-specification + (variable "CROSS_CPLUS_INCLUDE_PATH") + (files '("arm-none-eabi/include" + "arm-none-eabi/include/c++" + "arm-none-eabi/include/c++/arm-none-eabi"))) + (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files '("arm-none-eabi/lib"))))))))) -(define-public newlib-arm-none-eabi-7-2018-q2-update +(define make-newlib-arm-none-eabi-7-2018-q2-update ;; This is the same commit as used for the 7-2018-q2-update release ;; according to the release.txt. - (let ((commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4") - (revision "0")) - (package - (inherit newlib-arm-none-eabi) - (version (git-version "3.0.0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "http://sourceware.org/git/newlib-cygwin.git") - (commit commit))) - (file-name (git-file-name "newlib" commit)) - (sha256 - (base32 - "1dq23fqrk75g1a4v7569fvnnw5q440zawbxi3w0g05n8jlqsmvcy")))) - (arguments - (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi) - ;; The configure flags are identical to the flags used by the "GCC ARM - ;; embedded" project. - ((#:configure-flags flags) - `(cons* "--enable-newlib-io-c99-formats" - "--enable-newlib-retargetable-locking" - "--with-headers=yes" - ,flags)))) - (native-inputs - `(("xbinutils" ,(cross-binutils "arm-none-eabi")) - ("xgcc" ,gcc-arm-none-eabi-7-2018-q2-update) - ("texinfo" ,texinfo)))))) + (mlambda () + (let ((base (make-newlib-arm-none-eabi)) + (commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4") + (revision "0")) + (package + (inherit base) + (version (git-version "3.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "http://sourceware.org/git/newlib-cygwin.git") + (commit commit))) + (file-name (git-file-name "newlib" commit)) + (sha256 + (base32 + "1dq23fqrk75g1a4v7569fvnnw5q440zawbxi3w0g05n8jlqsmvcy")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ;; The configure flags are identical to the flags used by the "GCC + ;; ARM embedded" project. + ((#:configure-flags flags) + `(cons* "--enable-newlib-io-c99-formats" + "--enable-newlib-retargetable-locking" + "--with-headers=yes" + ,flags)))) + (native-inputs + `(("xbinutils" ,(cross-binutils "arm-none-eabi")) + ("xgcc" ,(make-gcc-arm-none-eabi-7-2018-q2-update)) + ("texinfo" ,texinfo))))))) -(define-public newlib-nano-arm-none-eabi-7-2018-q2-update - (package (inherit newlib-arm-none-eabi-7-2018-q2-update) - (name "newlib-nano") - (arguments - (package-arguments newlib-nano-arm-none-eabi)) - (synopsis "Newlib variant for small systems with limited memory"))) +(define-public make-newlib-nano-arm-none-eabi-7-2018-q2-update + (mlambda () + (let ((base (make-newlib-arm-none-eabi-7-2018-q2-update))) + (package + (inherit base) + (name "newlib-nano") + (arguments + (package-arguments base)) + (synopsis "Newlib variant for small systems with limited memory"))))) -(define (make-libstdc++-arm-none-eabi xgcc newlib) - (let ((libstdc++ (make-libstdc++ xgcc))) - (package (inherit libstdc++) - (name "libstdc++-arm-none-eabi") - (arguments - (substitute-keyword-arguments (package-arguments libstdc++) - ((#:configure-flags flags) - ``("--target=arm-none-eabi" - "--host=arm-none-eabi" - "--disable-libstdcxx-pch" - "--enable-multilib" - "--with-multilib-list=armv6-m,armv7-m,armv7e-m" - "--disable-shared" - "--disable-tls" - "--disable-plugin" - "--with-newlib" - ,(string-append "--with-gxx-include-dir=" - (assoc-ref %outputs "out") - "/arm-none-eabi/include/c++"))))) - (native-inputs - `(("newlib" ,newlib) - ("xgcc" ,xgcc) - ,@(package-native-inputs libstdc++)))))) +(define make-libstdc++-arm-none-eabi + (mlambda (xgcc newlib) + (let ((libstdc++ (make-libstdc++ xgcc))) + (package + (inherit libstdc++) + (name "libstdc++-arm-none-eabi") + (arguments + (substitute-keyword-arguments (package-arguments libstdc++) + ((#:configure-flags _) + ``("--target=arm-none-eabi" + "--host=arm-none-eabi" + "--disable-libstdcxx-pch" + "--enable-multilib" + "--with-multilib-list=armv6-m,armv7-m,armv7e-m" + "--disable-shared" + "--disable-tls" + "--disable-plugin" + "--with-newlib" + ,(string-append "--with-gxx-include-dir=" + (assoc-ref %outputs "out") + "/arm-none-eabi/include/c++"))))) + (native-inputs + `(("newlib" ,newlib) + ("xgcc" ,xgcc) + ,@(package-native-inputs libstdc++))))))) -(define (arm-none-eabi-toolchain xgcc newlib) - "Produce a cross-compiler toolchain package with the compiler XGCC and the C -library variant NEWLIB." - (let ((newlib-with-xgcc (package (inherit newlib) - (native-inputs - (alist-replace "xgcc" (list xgcc) - (package-native-inputs newlib)))))) - (package - (name (string-append "arm-none-eabi" - (if (string=? (package-name newlib-with-xgcc) - "newlib-nano") - "-nano" "") - "-toolchain")) - (version (package-version xgcc)) - (source #f) - (build-system trivial-build-system) - (arguments - '(#:modules ((guix build union)) - #:builder - (begin - (use-modules (ice-9 match) - (guix build union)) - (match %build-inputs - (((names . directories) ...) - (union-build (assoc-ref %outputs "out") - directories) - #t))))) - (propagated-inputs - `(("binutils" ,(cross-binutils "arm-none-eabi")) - ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc)) - ("gcc" ,xgcc) - ("newlib" ,newlib-with-xgcc))) - (synopsis "Complete GCC tool chain for ARM bare metal development") - (description "This package provides a complete GCC tool chain for ARM +(define make-arm-none-eabi-toolchain + (mlambda (xgcc newlib) + "Produce a cross-compiler toolchain package with the compiler XGCC and the +C library variant NEWLIB." + (let ((newlib-with-xgcc + (package + (inherit newlib) + (native-inputs + (alist-replace "xgcc" (list xgcc) + (package-native-inputs newlib)))))) + (package + (name (string-append "arm-none-eabi" + (if (string=? (package-name newlib-with-xgcc) + "newlib-nano") + "-nano" "") + "-toolchain")) + (version (package-version xgcc)) + (source #f) + (build-system trivial-build-system) + (arguments + '(#:modules ((guix build union)) + #:builder + (begin + (use-modules (ice-9 match) + (guix build union)) + (match %build-inputs + (((names . directories) ...) + (union-build (assoc-ref %outputs "out") + directories)))))) + (propagated-inputs + `(("binutils" ,(cross-binutils "arm-none-eabi")) + ("libstdc++" ,(make-libstdc++-arm-none-eabi xgcc newlib-with-xgcc)) + ("gcc" ,xgcc) + ("newlib" ,newlib-with-xgcc))) + (synopsis "Complete GCC tool chain for ARM bare metal development") + (description "This package provides a complete GCC tool chain for ARM bare metal development. This includes the GCC arm-none-eabi cross compiler and newlib (or newlib-nano) as the C library. The supported programming languages are C and C++.") - (home-page (package-home-page xgcc)) - (license (package-license xgcc))))) + (home-page (package-home-page xgcc)) + (license (package-license xgcc)))))) -(define-public arm-none-eabi-toolchain-4.9 - (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 - newlib-arm-none-eabi)) +(define make-arm-none-eabi-toolchain-4.9 + (mlambda () + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-4.9) + (make-newlib-arm-none-eabi)))) -(define-public arm-none-eabi-nano-toolchain-4.9 - (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 - newlib-nano-arm-none-eabi)) +(define make-arm-none-eabi-nano-toolchain-4.9 + (mlambda () + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-4.9) + (make-newlib-nano-arm-none-eabi)))) -(define-public arm-none-eabi-toolchain-6 - (arm-none-eabi-toolchain gcc-arm-none-eabi-6 - newlib-arm-none-eabi)) +(define make-arm-none-eabi-toolchain-6 + (mlambda () + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-6) + (make-newlib-arm-none-eabi)))) -(define-public arm-none-eabi-nano-toolchain-6 - (arm-none-eabi-toolchain gcc-arm-none-eabi-6 - newlib-nano-arm-none-eabi)) +(define make-arm-none-eabi-nano-toolchain-6 + (mlambda () + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-6) + (make-newlib-nano-arm-none-eabi)))) -(define-public arm-none-eabi-toolchain-7-2018-q2-update - (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update - newlib-arm-none-eabi-7-2018-q2-update)) +(define make-arm-none-eabi-toolchain-7-2018-q2-update + (mlambda () + (make-arm-none-eabi-toolchain + (make-gcc-arm-none-eabi-7-2018-q2-update) + (make-newlib-arm-none-eabi-7-2018-q2-update)))) -(define-public arm-none-eabi-nano-toolchain-7-2018-q2-update - (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update - newlib-nano-arm-none-eabi-7-2018-q2-update)) +(define make-arm-none-eabi-nano-toolchain-7-2018-q2-update + (mlambda () + (make-arm-none-eabi-toolchain + (make-gcc-arm-none-eabi-7-2018-q2-update) + (make-newlib-nano-arm-none-eabi-7-2018-q2-update)))) -(define-public gdb-arm-none-eabi - (package - (inherit gdb) - (name "gdb-arm-none-eabi") - (arguments - `(#:configure-flags '("--target=arm-none-eabi" - "--enable-multilib" - "--enable-interwork" - "--enable-languages=c,c++" - "--disable-nls") - ,@(package-arguments gdb))))) +(define make-gdb-arm-none-eabi + (mlambda () + (package + (inherit gdb) + (name "gdb-arm-none-eabi") + (arguments + `(#:configure-flags '("--target=arm-none-eabi" + "--enable-multilib" + "--enable-interwork" + "--enable-languages=c,c++" + "--disable-nls") + ,@(package-arguments gdb)))))) (define-public libjaylink (package @@ -647,116 +725,123 @@ (define-public openocd ;; personal correspondence with the developers in July 2017, more recent ;; versions are currently incompatible with the "Simple Libraries". -(define propeller-binutils - (let ((xbinutils (cross-binutils "propeller-elf")) - (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") - (revision "2")) - (package - (inherit xbinutils) - (name "propeller-binutils") - (version (string-append "0.0.0-" revision "." (string-take commit 9))) - (source (origin (inherit (package-source xbinutils)) - (method git-fetch) - (uri (git-reference - (url "https://github.com/parallaxinc/propgcc") - (commit commit))) - (file-name (string-append name "-" commit "-checkout")) - (sha256 - (base32 - "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck")) - (patches '()))) - (arguments - `(;; FIXME: For some reason there are many test failures. It's not - ;; obvious how to fix the failures. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda _ (chdir "binutils") #t))) - ,@(substitute-keyword-arguments (package-arguments xbinutils) - ((#:configure-flags flags) - `(cons "--disable-werror" ,flags))))) - (native-inputs - `(("bison" ,bison) - ("flex" ,flex) - ("texinfo" ,texinfo) - ("dejagnu" ,dejagnu) - ,@(package-native-inputs xbinutils)))))) +(define make-propeller-binutils + (mlambda () + (let ((xbinutils (cross-binutils "propeller-elf")) + (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") + (revision "2")) + (package + (inherit xbinutils) + (name "propeller-binutils") + (version (string-append "0.0.0-" revision "." (string-take commit 9))) + (source (origin + (inherit (package-source xbinutils)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/parallaxinc/propgcc") + (commit commit))) + (file-name (string-append name "-" commit "-checkout")) + (sha256 + (base32 + "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck")) + (patches '()))) + (arguments + `(;; FIXME: For some reason there are many test failures. It's not + ;; obvious how to fix the failures. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "binutils") #t))) + ,@(substitute-keyword-arguments (package-arguments xbinutils) + ((#:configure-flags flags) + `(cons "--disable-werror" ,flags))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + ("texinfo" ,texinfo) + ("dejagnu" ,dejagnu) + ,@(package-native-inputs xbinutils))))))) -(define-public propeller-gcc-6 - (let ((xgcc (cross-gcc "propeller-elf" - #:xbinutils propeller-binutils)) - (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867") - (revision "1")) - (package (inherit xgcc) - (name "propeller-gcc") - (version (string-append "6.0.0-" revision "." (string-take commit 9))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/totalspectrum/gcc-propeller") - (commit commit))) - (file-name (string-append name "-" commit "-checkout")) - (sha256 - (base32 - "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb")) - (patches - (append - (origin-patches (package-source gcc-6)) - (search-patches "gcc-cross-environment-variables.patch"))))) - (native-inputs - (modify-inputs (package-native-inputs xgcc) - (prepend flex))) - ;; All headers and cross libraries of the propeller toolchain are - ;; installed under the "propeller-elf" prefix. - (native-search-paths - (list (search-path-specification - (variable "CROSS_C_INCLUDE_PATH") - (files '("propeller-elf/include"))) - (search-path-specification - (variable "CROSS_LIBRARY_PATH") - (files '("propeller-elf/lib"))))) - (home-page "https://github.com/totalspectrum/gcc-propeller") - (synopsis "GCC for the Parallax Propeller")))) +(define make-propeller-gcc-6 + (mlambda () + (let ((xgcc (cross-gcc "propeller-elf" + #:xbinutils (make-propeller-binutils))) + (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867") + (revision "1")) + (package + (inherit xgcc) + (name "propeller-gcc") + (version (string-append "6.0.0-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/totalspectrum/gcc-propeller") + (commit commit))) + (file-name (string-append name "-" commit "-checkout")) + (sha256 + (base32 + "0d9kdxm2fzanjqa7q5850kzbsfl0fqyaahxn74h6nkxxacwa11zb")) + (patches + (append + (origin-patches (package-source gcc-6)) + (search-patches "gcc-cross-environment-variables.patch"))))) + (native-inputs + (modify-inputs (package-native-inputs xgcc) + (prepend flex))) + ;; All headers and cross libraries of the propeller toolchain are + ;; installed under the "propeller-elf" prefix. + (native-search-paths + (list (search-path-specification + (variable "CROSS_C_INCLUDE_PATH") + (files '("propeller-elf/include"))) + (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files '("propeller-elf/lib"))))) + (home-page "https://github.com/totalspectrum/gcc-propeller") + (synopsis "GCC for the Parallax Propeller"))))) -(define-public propeller-gcc-4 - (let ((xgcc propeller-gcc-6) - (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") - (revision "2")) - (package (inherit xgcc) - (name "propeller-gcc") - (version (string-append "4.6.1-" revision "." (string-take commit 9))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/parallaxinc/propgcc") - (commit commit))) - (file-name (string-append name "-" commit "-checkout")) - (sha256 - (base32 - "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck")) - (patch-flags (list "-p1" "--directory=gcc")) - (patches - (append - (origin-patches (package-source gcc-4.7)) - (search-patches "gcc-4.6-gnu-inline.patch" - "gcc-cross-environment-variables.patch"))))) - (arguments - (substitute-keyword-arguments (package-arguments propeller-gcc-6) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'unpack 'chdir - (lambda _ (chdir "gcc"))))))) - (native-inputs - (modify-inputs (package-native-inputs propeller-gcc-6) - (prepend gcc-4.9))) - (home-page "https://github.com/parallaxinc/propgcc") - (supported-systems (delete "aarch64-linux" %supported-systems))))) +(define make-propeller-gcc-4 + (mlambda () + (let ((xgcc (make-propeller-gcc-6)) + (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") + (revision "2")) + (package + (inherit xgcc) + (name "propeller-gcc") + (version (string-append "4.6.1-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/parallaxinc/propgcc") + (commit commit))) + (file-name (string-append name "-" commit "-checkout")) + (sha256 + (base32 + "0w0dff3s7wv2d9m78a4jhckiik58q38wx6wpbba5hzbs4yxz35ck")) + (patch-flags (list "-p1" "--directory=gcc")) + (patches + (append + (origin-patches (package-source gcc-4.7)) + (search-patches + "gcc-4.6-gnu-inline.patch" + "gcc-cross-environment-variables.patch"))))) + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'unpack 'chdir + (lambda _ (chdir "gcc"))))))) + (native-inputs + (modify-inputs (package-native-inputs xgcc) + (prepend gcc-4.9))) + (home-page "https://github.com/parallaxinc/propgcc") + (supported-systems (delete "aarch64-linux" %supported-systems)))))) ;; Version 6 is experimental and may not work correctly. This is why we ;; default to version 4, which is also used in the binary toolchain bundle ;; provided by Parallax Inc. -(define-public propeller-gcc propeller-gcc-4) +(define make-propeller-gcc make-propeller-gcc-4) ;; FIXME: We do not build the tiny library because that would require C++ @@ -814,7 +899,7 @@ (define-public proplib (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "install-includes" make-flags)))))) (native-inputs - (list propeller-gcc propeller-binutils perl)) + (list (make-propeller-gcc) (make-propeller-binutils) perl)) (home-page "https://github.com/parallaxinc/propgcc") (synopsis "C library for the Parallax Propeller") (description "This is a C library for the Parallax Propeller @@ -823,22 +908,24 @@ (define-public proplib ;; included code is public domain and some changes are BSD licensed. (license license:expat)))) -(define-public propeller-toolchain - (package - (name "propeller-toolchain") - (version (package-version propeller-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("binutils" ,propeller-binutils) - ("libc" ,proplib) - ("gcc" ,propeller-gcc))) - (synopsis "Complete GCC tool chain for Propeller micro-controllers") - (description "This package provides a complete GCC tool chain for +(define make-propeller-toolchain + (mlambda () + (let ((propeller-gcc (make-propeller-gcc))) + (package + (name "propeller-toolchain") + (version (package-version propeller-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("binutils" ,(make-propeller-binutils)) + ("libc" ,proplib) + ("gcc" ,propeller-gcc))) + (synopsis "Complete GCC tool chain for Propeller micro-controllers") + (description "This package provides a complete GCC tool chain for Propeller micro-controller development.") - (home-page (package-home-page propeller-gcc)) - (license (package-license propeller-gcc)))) + (home-page (package-home-page propeller-gcc)) + (license (package-license propeller-gcc)))))) (define-public openspin (package @@ -906,7 +993,7 @@ (define-public propeller-load (lambda _ (chdir "loader") #t)) (delete 'configure)))) (native-inputs - (list openspin propeller-toolchain)) + (list openspin (make-propeller-toolchain))) (home-page "https://github.com/parallaxinc/propgcc") (synopsis "Loader for Parallax Propeller micro-controllers") (description "This package provides the tool @code{propeller-load} to @@ -951,7 +1038,7 @@ (define-public spin2cpp '("testlex" "spin2cpp" "fastspin"))) #t))))) (native-inputs - (list bison propeller-load propeller-toolchain)) + (list bison propeller-load (make-propeller-toolchain))) (home-page "https://github.com/totalspectrum/spin2cpp") (synopsis "Convert Spin code to C, C++, or PASM code") (description "This is a set of tools for converting the Spin language for @@ -997,26 +1084,28 @@ (define-public spinsim two-thirds of the opcodes in the P2 instruction set.") (license license:expat)))) -(define-public propeller-development-suite - (package - (name "propeller-development-suite") - (version (package-version propeller-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("toolchain" ,propeller-toolchain) - ("openspin" ,openspin) - ("propeller-load" ,propeller-load) - ("spin2cpp" ,spin2cpp) - ("spinsim" ,spinsim))) - (synopsis "Complete development suite for Propeller micro-controllers") - (description "This meta-package provides a complete environment for the +(define make-propeller-development-suite + (mlambda () + (let ((propeller-gcc (make-propeller-gcc))) + (package + (name "propeller-development-suite") + (version (package-version propeller-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("toolchain" ,(make-propeller-toolchain)) + ("openspin" ,openspin) + ("propeller-load" ,propeller-load) + ("spin2cpp" ,spin2cpp) + ("spinsim" ,spinsim))) + (synopsis "Complete development suite for Propeller micro-controllers") + (description "This meta-package provides a complete environment for the development with Parallax Propeller micro-controllers. It includes the GCC toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin simulator.") - (home-page (package-home-page propeller-gcc)) - (license (package-license propeller-gcc)))) + (home-page (package-home-page propeller-gcc)) + (license (package-license propeller-gcc)))))) (define-public binutils-vc4 (let ((commit "708acc851880dbeda1dd18aca4fd0a95b2573b36")) @@ -1070,32 +1159,34 @@ (define-public binutils-vc4 (license license:gpl3+) (home-page "https://github.com/puppeh/vc4-toolchain/")))) -(define-public gcc-vc4 - (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377") - (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4))) - (package (inherit xgcc) - (name "gcc-vc4") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/puppeh/gcc-vc4") - (commit commit))) - (file-name (string-append name - "-" - (package-version xgcc) - "-checkout")) - (sha256 - (base32 - "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr")) - (patches - (search-patches "gcc-6-fix-buffer-size.patch" - "gcc-6-fix-isl-includes.patch")))) - (native-inputs - (modify-inputs (package-native-inputs xgcc) - (prepend flex))) - (synopsis "GCC for VC4") - (description "This package provides @code{gcc} for VideoCore IV, -the Raspberry Pi chip.")))) +(define make-gcc-vc4 + (mlambda () + (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377") + (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4))) + (package + (inherit xgcc) + (name "gcc-vc4") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/puppeh/gcc-vc4") + (commit commit))) + (file-name (string-append name + "-" + (package-version xgcc) + "-checkout")) + (sha256 + (base32 + "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr")) + (patches + (search-patches "gcc-6-fix-buffer-size.patch" + "gcc-6-fix-isl-includes.patch")))) + (native-inputs + (modify-inputs (package-native-inputs xgcc) + (prepend flex))) + (synopsis "GCC for VC4") + (description "This package provides @code{gcc} for VideoCore IV, +the Raspberry Pi chip."))))) (define-public imx-usb-loader ;; There are no proper releases. diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index a866a7e4f29..80bfaf0896c 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -177,7 +177,7 @@ (define-public raspi-arm-chainloader #t)))))) (native-inputs `(("binutils" ,(cross-binutils "arm-none-eabi")) - ("gcc" ,gcc-arm-none-eabi-6))) + ("gcc" ,(make-gcc-arm-none-eabi-6)))) (inputs `()) (synopsis "Raspberry Pi ARM bootloader") -- 2.41.0
maxim.cournoyer@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 18 Sep 2023 00:43:54 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 20:43:54 2023 Received: from localhost ([127.0.0.1]:51666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qi2Mj-0001oQ-PB for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:54 -0400 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:46219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qi2Mg-0001ny-C2 for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:52 -0400 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-410af8f75d9so25130921cf.0 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 17:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694997816; x=1695602616; 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=zwO2dzNNWv7qD8DUygWO0h5vAK9AGgtrLoa5cJdFFeU=; b=BPbm6+v4vl/3Ns2KtidqjpBlwsX7S42XKSsggxYbo8lo/g8/rdUrKyXTlUfm6IoEM4 O+HFJTki25WvIhTszr9GJBcDVxazXkflr6FAoSs9AIRPb08dq2djb/dmE5Hvye+aKlaY DUOMNigiM9P4agk2IlRZ4lf+aPhIZ1V/d6cZ21G9rrvTan+DlYEJet1wpXRFQ+jpmvZx 7WM+GtCa8iysH01WQaHD+MSNID/APj2j9FJqCH339wRWVumIMsvEnEeNlk2MGsqHyr96 81XAtHbIjT69Qizu+8uNs4UcKnH4ZgIXN8ODXnkEub5VWwPJj1ZS5NuACA8z23M9HdmJ 61Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694997816; x=1695602616; 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=zwO2dzNNWv7qD8DUygWO0h5vAK9AGgtrLoa5cJdFFeU=; b=NJqkX/1LLoILt8yC6Qx2oh4liTQ8HDijIR5mVUGUl/p3QcrexC72ZZb6UX744CalMl 3a28bFpOxcn9KnysZG8iqtWfu8WCTDSvCxfmoAwTrRe0SO7VY/KIn36O6dYq76NZ49RS 9LRdoehddOsCF1zKgOPB+JJ+TDEx83Kdg2Thfy1udQlhgNcjcmpe7Rjf/QTyktrurt1O I5xbSNKIXznMskEvgkNhnEr9l5XAV/5hPrwIiNsxbiufZyO4GIl48NvSDsgLjbaMt/RH Q7kjjIP+HiAh0bOj7i5AzU6B51JbE3zob54g0CRLDNijN6X8Z4JbjNetMlmoOOkyruEb sQIg== X-Gm-Message-State: AOJu0YyfJmHPdLpleyr/BYNOaZ1kmwl6WASOanziAM41Pt4U0WV/FYHp 93VyLnRDS4J7VmdD13nsWEgkNqUucCs= X-Google-Smtp-Source: AGHT+IEf+VB55YxfLdBc8J8afkU3yVPcufMEUeQcIRqk6HZSc9A3+fgFm7D5aJeCUXm1MLvFaeSosg== X-Received: by 2002:a05:622a:1822:b0:412:2513:fb6 with SMTP id t34-20020a05622a182200b0041225130fb6mr7286051qtc.5.1694997816579; Sun, 17 Sep 2023 17:43:36 -0700 (PDT) Received: from localhost.localdomain (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id cr8-20020a05622a428800b00403f1a7be90sm2662547qtb.88.2023.09.17.17.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 17:43:36 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH v2 1/3] gnu: avr: Delay all cross compilation packages. Date: Sun, 17 Sep 2023 20:43:08 -0400 Message-ID: <9431a70a1d444c86ff64f8386740e40e036e6b0a.1694997755.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694997755.git.maxim.cournoyer@HIDDEN> References: <cover.1694997755.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Partially addresses <https://issues.guix.gnu.org/65716>. * gnu/packages/avr.scm: Add commentary comment. (avr-gcc): Turn into this... (make-avr-gcc): ... procedure. (avr-libc): Likewise, into... (make-avr-gcc): ... this. Adjust native-inputs accordingly. (avr-toolchain): Likewise, into... (make-avr-toolchain): ... this. * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-toolchain with a call to the 'make-avr-toolchain' procedure. --- Changes in v2: - Use mlambda for procedures - Fix ((make-avr-toolchain)) typo gnu/packages/avr-xyz.scm | 2 +- gnu/packages/avr.scm | 214 +++++++++++++++++++++------------------ 2 files changed, 119 insertions(+), 97 deletions(-) diff --git a/gnu/packages/avr-xyz.scm b/gnu/packages/avr-xyz.scm index a05157ede78..e8844b8d438 100644 --- a/gnu/packages/avr-xyz.scm +++ b/gnu/packages/avr-xyz.scm @@ -71,7 +71,7 @@ (define-public simavr (string-append "PREFIX=" #$output) (string-append "DESTDIR=" #$output)))) (propagated-inputs - (list avr-toolchain)) + (list (make-avr-toolchain))) (native-inputs (list autoconf which diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index b9bee5e624c..1277634ce5a 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -25,6 +25,7 @@ (define-module (gnu packages avr) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) + #:use-module (guix memoization) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix git-download) @@ -37,113 +38,134 @@ (define-module (gnu packages avr) #:use-module (gnu packages flashing-tools) #:use-module (gnu packages gcc) #:use-module (gnu packages llvm) - #:use-module (gnu packages vim)) + #:use-module (gnu packages vim) + #:export (make-avr-toolchain)) -(define-public avr-binutils +;;; Commentary: +;;; +;;; This module defines a procedure that can be used to create a complete +;;; avr-toolchain package. The procedure must not be used at the top level, +;;; to avoid cyclic module dependencies caused by the (gnu packages +;;; cross-base) module referring to top level bindings from (gnu packages +;;; gcc). +;;; +;;; It also contains packages for working with or targeting the AVR system. +;;; + +(define (make-avr-binutils) (package (inherit (cross-binutils "avr")) (name "avr-binutils"))) -(define avr-gcc - (let ((xgcc (cross-gcc "avr" #:xbinutils avr-binutils))) +(define make-avr-gcc + (mlambda () + (let ((xgcc (cross-gcc "avr" #:xbinutils (make-avr-binutils)))) + (package + (inherit xgcc) + (name "avr-gcc") + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:phases phases) + #~(modify-phases #$phases + (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Remove the default compiler from CPLUS_INCLUDE_PATH + ;; to prevent header conflict with the GCC from + ;; native-inputs. + (setenv "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append gcc "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") + #\:)) + ":")) + (format #t + "environment variable `CPLUS_INCLUDE_PATH' \ +changed to ~a~%" + (getenv "CPLUS_INCLUDE_PATH"))))) + ;; Without a working multilib build, the resulting GCC lacks + ;; support for nearly every AVR chip. + (add-after 'unpack 'fix-genmultilib + (lambda _ + ;; patch-shebang doesn't work here because there are + ;; actually several scripts inside this script, each with + ;; a #!/bin/sh that needs patching. + (substitute* "gcc/genmultilib" + (("#!/bin/sh") (string-append "#!" (which "sh")))))))) + ((#:configure-flags flags) + #~(delete "--disable-multilib" #$flags)))) + (native-search-paths + (list (search-path-specification + (variable "CROSS_C_INCLUDE_PATH") + (files '("avr/include"))) + (search-path-specification + (variable "CROSS_CPLUS_INCLUDE_PATH") + (files '("avr/include"))) + (search-path-specification + (variable "CROSS_OBJC_INCLUDE_PATH") + (files '("avr/include"))) + (search-path-specification + (variable "CROSS_OBJCPLUS_INCLUDE_PATH") + (files '("avr/include"))) + (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files '("avr/lib"))))) + (native-inputs + `(("gcc" ,gcc) + ,@(package-native-inputs xgcc))))))) + +(define make-avr-libc + (mlambda () (package - (inherit xgcc) - (name "avr-gcc") + (name "avr-libc") + (version "2.0.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://savannah//avr-libc/avr-libc-" + version ".tar.bz2")) + (sha256 + (base32 + "15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj")))) + (build-system gnu-build-system) (arguments - (substitute-keyword-arguments (package-arguments xgcc) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'set-paths 'augment-CPLUS_INCLUDE_PATH - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Remove the default compiler from CPLUS_INCLUDE_PATH to - ;; prevent header conflict with the GCC from native-inputs. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") - #\:)) - ":")) - (format #t - "environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%" - (getenv "CPLUS_INCLUDE_PATH"))))) - ;; Without a working multilib build, the resulting GCC lacks - ;; support for nearly every AVR chip. - (add-after 'unpack 'fix-genmultilib - (lambda _ - ;; patch-shebang doesn't work here because there are actually - ;; several scripts inside this script, each with a #!/bin/sh - ;; that needs patching. - (substitute* "gcc/genmultilib" - (("#!/bin/sh") (string-append "#!" (which "sh")))))))) - ((#:configure-flags flags) - #~(delete "--disable-multilib" #$flags)))) - (native-search-paths - (list (search-path-specification - (variable "CROSS_C_INCLUDE_PATH") - (files '("avr/include"))) - (search-path-specification - (variable "CROSS_CPLUS_INCLUDE_PATH") - (files '("avr/include"))) - (search-path-specification - (variable "CROSS_OBJC_INCLUDE_PATH") - (files '("avr/include"))) - (search-path-specification - (variable "CROSS_OBJCPLUS_INCLUDE_PATH") - (files '("avr/include"))) - (search-path-specification - (variable "CROSS_LIBRARY_PATH") - (files '("avr/lib"))))) - (native-inputs - `(("gcc" ,gcc) - ,@(package-native-inputs xgcc)))))) + '(#:out-of-source? #t + #:configure-flags '("--host=avr"))) + (native-inputs `(("avr-binutils" ,(make-avr-binutils)) + ("avr-gcc" ,(make-avr-gcc)))) + (home-page "https://www.nongnu.org/avr-libc/") + (synopsis "The AVR C Library") + (description + "AVR Libc is a project whose goal is to provide a high quality C +library for use with GCC on Atmel AVR microcontrollers.") + (license + (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt"))))) -(define avr-libc - (package - (name "avr-libc") - (version "2.0.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://savannah//avr-libc/avr-libc-" - version ".tar.bz2")) - (sha256 - (base32 - "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))) - (home-page "https://www.nongnu.org/avr-libc/") - (synopsis "The AVR C Library") - (description - "AVR Libc is a project whose goal is to provide a high quality C library -for use with GCC on Atmel AVR microcontrollers.") - (license - (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt")))) - -(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. - (package - (name "avr-toolchain") - (version (package-version avr-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("avrdude" ,avrdude) - ("binutils" ,avr-binutils) - ("gcc" ,avr-gcc) - ("libc" ,avr-libc))) - (synopsis "Complete GCC tool chain for AVR microcontroller development") - (description "This package provides a complete GCC tool chain for AVR +(define make-avr-toolchain + (mlambda () + (let ((avr-binutils (make-avr-binutils)) + (avr-libc (make-avr-libc)) + (avr-gcc (make-avr-gcc))) + ;; 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. + (package + (name "avr-toolchain") + (version (package-version avr-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("avrdude" ,avrdude) + ("binutils" ,avr-binutils) + ("gcc" ,avr-gcc) + ("libc" ,avr-libc))) + (synopsis "Complete GCC tool chain for AVR microcontroller development") + (description "This package provides a complete GCC tool chain for AVR microcontroller development. This includes the GCC AVR cross compiler and avrdude for firmware flashing. The supported programming languages are C and C++.") - (home-page (package-home-page avr-libc)) - (license (package-license avr-gcc)))) + (home-page (package-home-page avr-libc)) + (license (package-license avr-gcc)))))) (define-public microscheme (package -- 2.41.0
maxim.cournoyer@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 18 Sep 2023 00:43:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 20:43:46 2023 Received: from localhost ([127.0.0.1]:51663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qi2Mc-0001o5-GN for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:46 -0400 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:55310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qi2Ma-0001nq-KN for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 20:43:45 -0400 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-412195b1e9aso27541591cf.2 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 17:43:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694997811; x=1695602611; 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=G77VGTyTUSStty3lRb2ULl6KZpQ/rczhAkj/o3X02Jk=; b=S/kLYCpbIGz3x0scMxxCrWYoJMe6oxu/KFy5I1lIKFZx56jBsuuEhbuShtBbZu0UNk s4hI/kBbdiZnYogl97kJRhZGLOKFOyYH1Z65J5Bbr1wcEycjWDGLbfjaQlT0OPRDWWYG Z8EJ2Sn+qm1BRX5oXm0u33xt2TwFn6ELMFuV3rFp7gdtHH24Sk5NWGyLldvJ90bX7ajR 0Y0hSA4dJ3jDhEudJvgfgr1SSm7iBqOLxLhhveb3+3lLKg39eVN1JOZ29GX/z48GLdkH OUbFdZSr7H2DO6uF0aTaWQsJrZlplxD9XNsMhm3HUQb1nuVCV1BfI4VrVptZFiB6xtfo FH2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694997811; x=1695602611; 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=G77VGTyTUSStty3lRb2ULl6KZpQ/rczhAkj/o3X02Jk=; b=EiDHcjhOeRuZGq4F46dZn4Dgjb/rc40rcOmoJlVpP+PliM12Nrqm9sCiiLeuKF1DJx god19H+XJFNdOJRtmNfsmfZaHvOmU0JSCix/76KpzMWGAQIgkGCG5pdD58T0WNletIj+ 4E3m2GYyUocBBq+8XzHhwm29R4iWjU0K5fLbixhm1fMUbzrkviC7yPlxZcv9sIuStI8C DOxYLrsWNJKizjZmhruzX4upkSIFcjrr6wz/fojxqqNVoKfg/Wai7QkJHcZjIkUgZJIp s1YEZnPY+lza1t1/nqcc5AYPuvFBETF0UHad27yqz1ehOp8ExXHnnWuuKNtEd5g7OiKs ez3A== X-Gm-Message-State: AOJu0Yy9mkt+lIDmT0TcR3nSs7VgyoSe2u5zm8kyozJpZ+SYv5jVFytC 6d2Sn7UeK2hmzxpeEU/0Gb1ZpnYRpOM= X-Google-Smtp-Source: AGHT+IEf6fvXtURYw5RSThkpcPS8qY38Ce8yLnKuJwB2+czK/Mv4iDosVAlQw28JP096qQ8XXxwcKw== X-Received: by 2002:ac8:5753:0:b0:412:d89:9572 with SMTP id 19-20020ac85753000000b004120d899572mr10340024qtx.9.1694997810828; Sun, 17 Sep 2023 17:43:30 -0700 (PDT) Received: from localhost.localdomain (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id cr8-20020a05622a428800b00403f1a7be90sm2662547qtb.88.2023.09.17.17.43.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 17:43:30 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH v2 0/3] Resolve a circular module dependencies in embedded modules Date: Sun, 17 Sep 2023 20:43:07 -0400 Message-ID: <cover.1694997755.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Debbugs-Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ludovic Courtès <ludo@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) This series is the culmination of at least a day of effort tracking down the source of a module dependency cycle (!). The last commit adds some guidelines in the hope to avoid a repeat (perhaps 'lint' could be taught to automate these checks). Changes in v2: - Use mlambda for procedures - Fix ((make-avr-toolchain)) typo - Use mlambda for procedures Maxim Cournoyer (3): gnu: avr: Delay all cross compilation packages. gnu: embedded: Turn packages using top-level variables into procedures. doc: Add new 'Circular Module Dependencies' section. doc/contributing.texi | 56 ++ gnu/packages/avr-xyz.scm | 2 +- gnu/packages/avr.scm | 214 +++--- gnu/packages/axoloti.scm | 6 +- gnu/packages/embedded.scm | 1227 ++++++++++++++++++--------------- gnu/packages/raspberry-pi.scm | 2 +- 6 files changed, 838 insertions(+), 669 deletions(-) base-commit: fc1b4756e36857e66986a30a6652ee988f8f30fd -- 2.41.0
maxim.cournoyer@HIDDEN, ludo@HIDDEN, guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 17 Sep 2023 20:27:21 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 17 16:27:21 2023 Received: from localhost ([127.0.0.1]:51528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qhyMS-0002xU-Uk for submit <at> debbugs.gnu.org; Sun, 17 Sep 2023 16:27:21 -0400 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:53313) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qhyMN-0002xC-NU for 65860 <at> debbugs.gnu.org; Sun, 17 Sep 2023 16:27:19 -0400 Received: by mail-qv1-xf36.google.com with SMTP id 6a1803df08f44-65636207df5so12165926d6.2 for <65860 <at> debbugs.gnu.org>; Sun, 17 Sep 2023 13:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694982422; x=1695587222; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=7WG3tRTfLy+watTY6jR5GpTlyG/dS57II+qXRBTE7cc=; b=XCfxl1lAw/zJDww7JUihFnQ1wZDzS8QChZmp9JSUXb/nrbqhYwsfqPBy6zPfynP5YM zkq81m0gAx46B6qhJPem0lMlhY/v/xwqRSA4W7pSh6a64vpgigKD+EJDJXUK7Oshjb/+ xy0cOpJQxPoac686whl1oNqTOxylaVZtZUcvUshrR5s9+AMfPiuck/THe4bTEG3t/gwz DFR9mm5cS1UM/EEp4NKAKhl8G8sqpvHrQ8rPds3kbr3O+j9x302olNjj/M+UIiYOscjx ret9ODKMyCfaxWVZpnnlgHuObvhfSKADylka/r8MuVfsjZ6TG2DGRF1+vsbQbXbtts1w kqmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694982422; x=1695587222; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7WG3tRTfLy+watTY6jR5GpTlyG/dS57II+qXRBTE7cc=; b=ENjirmhLTQ9JiR+dnxPIJVxlpycocSitC/kPg9p19dFRT3CHv9JrJu3fpWeGuCBH6f IToUNrZVYXJIh66rzUF91KzyOeYLNf4Fy8C/uxkQPi9psHn/wGUwdo4i1J2gyh2Ba/QH 2KPsyNxYZVrZgOmSguAaMGNqv5aziSMnTvBsrznnpmU1cJvWHfCZbDtQAAb/G2RGipso WOOaE+pOoIOxtXV3rOtrycupjhq52MY4bYDzUjeeVRQp5x2sXLQ9VwkYNvxn5ILqD7p8 gVoLFIMw5A1ITfL+UknOxscyFnE3bZ5+mAR7XgeojTlLn514G1u7ql/XOU9YZXN3rcJo PYLQ== X-Gm-Message-State: AOJu0YyAW2P0l2UYUjV5c5IHA53HQ+DNf/RLVQFXHxVfPrlVCZDVi+p7 kJYXVfVxyL5b4vt5goNAWJg= X-Google-Smtp-Source: AGHT+IEsvEO3MI+Sd06xL8+O9MaDGslorLzRYtKmhudC2Kee7yxoDy0f9P0cuqRZSH7CpDEbCmyoJw== X-Received: by 2002:ad4:5a13:0:b0:645:df54:cf83 with SMTP id ei19-20020ad45a13000000b00645df54cf83mr7505051qvb.38.1694982422143; Sun, 17 Sep 2023 13:27:02 -0700 (PDT) Received: from hurd (dsl-10-149-131.b2b2c.ca. [72.10.149.131]) by smtp.gmail.com with ESMTPSA id e3-20020ad44183000000b0063d30c10f1esm2723912qvp.70.2023.09.17.13.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 13:27:01 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: [bug#65860] [PATCH 3/4] gnu: Remove extraneous imports. References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <bc65388b056610e75bd56abb4bc3481e3b9c0035.1694406359.git.maxim.cournoyer@HIDDEN> <87cyylltx7.fsf@HIDDEN> Date: Sun, 17 Sep 2023 16:27:00 -0400 In-Reply-To: <87cyylltx7.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Wed, 13 Sep 2023 22:06:28 +0200") Message-ID: <87y1h47dgr.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Ricardo Wurmus <rekado@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>, 65860 <at> debbugs.gnu.org, Efraim Flashner <efraim@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hi, > > Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > >> Found by running 'guild compile -W3 gnu/packages/$module.scm', using gui= ld >> from the upcoming Guile. > > Excellent, go for it! Great, I've installed this single commit to master. --=20 Thanks, Maxim
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 14 Sep 2023 09:11:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 14 05:11:01 2023 Received: from localhost ([127.0.0.1]:37638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qgiNJ-0002D2-7M for submit <at> debbugs.gnu.org; Thu, 14 Sep 2023 05:11:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qgiNH-0002Cm-Co for 65860 <at> debbugs.gnu.org; Thu, 14 Sep 2023 05:10:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qgiN6-0002eh-8g; Thu, 14 Sep 2023 05:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=mUtNMogvedtEnLi2EaeZZ0ueRZ0i5wp96OwhlmH82Gw=; b=bDmStyh5IPctKTIvGRBs +mIW3y6Vknm4RRH5tlqD1j6UQoNcLLoGuqfUO+vLAxTXLZBWuV7KDkUjwQqG+PYmEtxBX2D/rLyp7 VjaU92HIWXAG7ITAxE21JTnVb/8frD8yIvRty13VZJYnoDwS0KjFhS2X6DqbiphdIR9PnKWfh9/XM +PIcfqaUolclIKzNU9GH3opsSRvpjgZ8FnQPkceU+BPBjOQa9VKs+988mGMRX7M1YXnsEN/+DM5Zn dpy2wLY6dxjwdnLrcEUf7EaWLCKU4pPssETrQ0IoIUt7THWtNbGYPjzZBCFsFNwWKj0MFH5WtfUj8 LuZeHMlXI6kz7w==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65860: [PATCH 0/4] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> <87r0n1kedj.fsf_-_@HIDDEN> <8734zhv49z.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 28 Fructidor an 231 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du =?utf-8?Q?Ma=C3=AFs?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 14 Sep 2023 11:10:44 +0200 In-Reply-To: <8734zhv49z.fsf@HIDDEN> (Maxim Cournoyer's message of "Wed, 13 Sep 2023 23:10:16 -0400") Message-ID: <87o7i5glwr.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65860 Cc: 65860 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > Ludovic Court=C3=A8s <ludo@HIDDEN> writes: [...] >> People will lose the ability to install those toolchains, for instance >> with =E2=80=98guix install propeller-toolchain=E2=80=99, or to upgrade p= rofiles that >> contain them (though =E2=80=98guix install axoloti-runtime=E2=80=99 is s= till good, for >> instance). >> >> I=E2=80=99m not sure whether that=E2=80=99s acceptable, but we should ch= eck with known >> users of this, such as Ricardo. > > It's a pity to loose that ability (it's also a pity to not be able to > simply 'guix install gcc-cross-some-target', for the same reason) but > the statu quo where pulling (gnu packages avr) causes hard to grasp > failures is worst, in my opinion. I wasn't able to work on adding > packages dependent on (gnu packages avr) for that reason. Debugging was > a pain. Oh yes, I=E2=80=99ve been there, so I can tell you I sympathize. :-) I agree that this needs to be addressed. I wondered whether/how hard we should search for a different solution. >> I=E2=80=99ve always felt that these toolchains should be provided as par= t of the >> =E2=80=9Cregular=E2=80=9D cross-compilation framework in cross-base.scm.= Packages that >> always need to be cross-compiled (to AVR microcontrollers, etc.) would >> have a hardcoded #:target in their =E2=80=98arguments=E2=80=99 field. I= forgot why this >> was rejected. > > That'd be an improvement, I think. Right now we have to call a > procedure in the input fields everywhere, it's not very elegant. BTW, another issue with the package-returning procedures: they return a fresh package object at each call, which defeats caching. I think you should be able to observe it with: GUIX_PROFILING=3Dobject-cache guix build axoloti-runtime -d --no-grafts The effect will be more acute on the build farms since they compute derivations for everything that depends on these toolchains. The solution would be to make those procedures memoizing, with =E2=80=98mla= mbda=E2=80=99 or similar. Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 14 Sep 2023 03:10:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 23:10:49 2023 Received: from localhost ([127.0.0.1]:36426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qgckV-00066f-2g for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 23:10:48 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:61463) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qgckQ-00066O-GO for 65860 <at> debbugs.gnu.org; Wed, 13 Sep 2023 23:10:33 -0400 Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-4132c2cee1dso2695411cf.2 for <65860 <at> debbugs.gnu.org>; Wed, 13 Sep 2023 20:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694661019; x=1695265819; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=/FN7X0MOt9wfC6ncVnqg+KwTbkU7skTr0chtCAgCSV8=; b=F15rWARkr3CQcMhjwjeDPRmBvQtLWRCzw31NksNh4zQX3UZtuF2+VkbkIL3Jl0f20w EoOuFJUEPl76yemEB8GRwF19flwCyKAHddizTCjDpEDmeA2cuT4ew7aJpcPeD6eW36Fd C1lRDhG5xNuSfxP2zxMQWIm0WtWkwoA2Q3RXWT/m8HPUXemdj8f2HbBR87k4ZuJRLusg x9sStmPEa30W2qEJQhfpziVxdGss68KC/ck9lewvB99mXHJ5BshACBe+1HTsCON1ILx+ yR9RxcPTBAXsh4d3UqVJ1hAI4Lm/KQTahqIQ7DcYov9HdxPQKCRG4dx5zKx1QPqP+UUT NauA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694661019; x=1695265819; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/FN7X0MOt9wfC6ncVnqg+KwTbkU7skTr0chtCAgCSV8=; b=LyFjKAtoh4JR3Z8d2mtiA4wv9/VUPdLbd3NFrX8YYQ9PsftFGn1WM2xTqZZOGt/BfI NH4T9bcmbcDZS5qRnGz7ihofyG7m0vUiU3i/i6C6hfHC5fZy/iSLZDKtEZgnW+8BzBI2 KhXEzxuI3X45vWa6GjfWG8YuXlntCWsdOvmeiK7TvMRIh4/OIvAtpj4tkeqY1veO9HLl wrfxqys82Uzrfb1Ljy/8YKnGjzo6bWpghxZ9Ehxz3aAiu9BVp5du2SdRqVX0CWbyTjLQ BiH+i4Y5cGGgbyh6+eX8lJSHe96qecYH9D4Zf3ota4KzK6x8hmnqcBDmQA5JZ/s9brrR WEcg== X-Gm-Message-State: AOJu0YyzCMggQPrBmtt2BlJgqleoV3IYLfY4q2uAohXUGZ0YjGDZRfOr Wtvv3aG3BPNG1lTE6DlLSHyoK5J4HoM= X-Google-Smtp-Source: AGHT+IHpU0Cn0UMqeXXC1+aKAZ5Rj0pybINcCaZnnwFL4B/GQ4kCjHYv5nInKWuQpzQmfF/HBGG62w== X-Received: by 2002:ac8:59c1:0:b0:410:a9f8:c7e6 with SMTP id f1-20020ac859c1000000b00410a9f8c7e6mr4183846qtf.42.1694661018686; Wed, 13 Sep 2023 20:10:18 -0700 (PDT) Received: from hurd (dsl-149-165.b2b2c.ca. [66.158.149.165]) by smtp.gmail.com with ESMTPSA id f5-20020ac80685000000b0040554ed322dsm186293qth.62.2023.09.13.20.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 20:10:18 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN> Subject: Re: bug#65860: [PATCH 0/4] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> <87r0n1kedj.fsf_-_@HIDDEN> Date: Wed, 13 Sep 2023 23:10:16 -0400 In-Reply-To: <87r0n1kedj.fsf_-_@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s?= =?utf-8?Q?=22's?= message of "Wed, 13 Sep 2023 22:27:36 +0200") Message-ID: <8734zhv49z.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: 65860 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Hi, Ludovic Court=C3=A8s <ludo@HIDDEN> writes: > Hi, > > Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > >> Partially addresses <https://issues.guix.gnu.org/65716>. >> >> * gnu/packages/avr.scm: Add commentary comment. >> (avr-gcc): Turn into this... >> (make-avr-gcc): ... procedure. >> (avr-libc): Likewise, into... >> (make-avr-gcc): ... this. Adjust native-inputs accordingly. >> (avr-toolchain): Likewise, into... >> (make-avr-toolchain): ... this. >> * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-too= lchain >> with a call to the 'make-avr-toolchain' procedure. > > [...] > >> Fixes <https://issues.guix.gnu.org/65716>. >> >> Before this change, simply adding the following import: >> >> modified gnu/packages/firmware.scm >> @@ -42,6 +42,7 @@ (define-module (gnu packages firmware) >> #:use-module (gnu packages admin) >> #:use-module (gnu packages autotools) >> #:use-module (gnu packages assembly) >> + #:use-module (gnu packages avr) >> #:use-module (gnu packages backup) >> #:use-module (gnu packages base) >> #:use-module (gnu packages bash) >> >> Would cause byte compilation and/or evaluation to fail due to a circular >> module dependency. [...] > People will lose the ability to install those toolchains, for instance > with =E2=80=98guix install propeller-toolchain=E2=80=99, or to upgrade pr= ofiles that > contain them (though =E2=80=98guix install axoloti-runtime=E2=80=99 is st= ill good, for > instance). > > I=E2=80=99m not sure whether that=E2=80=99s acceptable, but we should che= ck with known > users of this, such as Ricardo. It's a pity to loose that ability (it's also a pity to not be able to simply 'guix install gcc-cross-some-target', for the same reason) but the statu quo where pulling (gnu packages avr) causes hard to grasp failures is worst, in my opinion. I wasn't able to work on adding packages dependent on (gnu packages avr) for that reason. Debugging was a pain. > I=E2=80=99ve always felt that these toolchains should be provided as part= of the > =E2=80=9Cregular=E2=80=9D cross-compilation framework in cross-base.scm. = Packages that > always need to be cross-compiled (to AVR microcontrollers, etc.) would > have a hardcoded #:target in their =E2=80=98arguments=E2=80=99 field. I = forgot why this > was rejected. That'd be an improvement, I think. Right now we have to call a procedure in the input fields everywhere, it's not very elegant. Until then, the change proposed here seems the best we can do. I've been adding new avr-dependent firmware packages in (gnu packages firmware) happily on top of it. --=20 Thanks, Maxim
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 13 Sep 2023 20:27:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 16:27:55 2023 Received: from localhost ([127.0.0.1]:36168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qgWSo-0007NI-Sn for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 16:27:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qgWSn-0007N3-43 for 65860 <at> debbugs.gnu.org; Wed, 13 Sep 2023 16:27:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qgWSc-0003tX-58; Wed, 13 Sep 2023 16:27:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=NDQ5ZvFFh7Pavn0HN+gIMpFZXf+u+6A5Yvb3DaaZ39U=; b=XN33HHZf3JvsuRyY52XH MXBtEJe8ohhgU+yskne6eaibWaZfhbAG/0XnqVXeO4Qy4drW1LgneTrtaSpvCiyQJXoVUJyJKtuwD Ch+zM6Yi4A95W04OFd6Dqw+eZA2+q3EjWfhe99JdQE/8EU6Ewx6es/wIAD194+q7FvKCtQJyYCTiD zljHIRDrWzmSyv4/oy5mZSbNCrpuH4T3eAZLXGcQcgjUe9V/QfZ8yIxX4eI4vWhoIP8DUrI2y7Qlp ZwpCioJiBxXxrNa+EnLQg7C32jzNP3gpHBMr+O54qpQkM7RQuqSVDgC+iDF8XQz3JQlJ7TazTTd9R tv4s85Aqv1izzg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: bug#65860: [PATCH 0/4] Resolve a circular module dependencies in embedded modules References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> Date: Wed, 13 Sep 2023 22:27:36 +0200 In-Reply-To: <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> (Maxim Cournoyer's message of "Mon, 11 Sep 2023 00:25:57 -0400") Message-ID: <87r0n1kedj.fsf_-_@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65860 Cc: 65860 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > Partially addresses <https://issues.guix.gnu.org/65716>. > > * gnu/packages/avr.scm: Add commentary comment. > (avr-gcc): Turn into this... > (make-avr-gcc): ... procedure. > (avr-libc): Likewise, into... > (make-avr-gcc): ... this. Adjust native-inputs accordingly. > (avr-toolchain): Likewise, into... > (make-avr-toolchain): ... this. > * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-tool= chain > with a call to the 'make-avr-toolchain' procedure. [...] > Fixes <https://issues.guix.gnu.org/65716>. > > Before this change, simply adding the following import: > > modified gnu/packages/firmware.scm > @@ -42,6 +42,7 @@ (define-module (gnu packages firmware) > #:use-module (gnu packages admin) > #:use-module (gnu packages autotools) > #:use-module (gnu packages assembly) > + #:use-module (gnu packages avr) > #:use-module (gnu packages backup) > #:use-module (gnu packages base) > #:use-module (gnu packages bash) > > Would cause byte compilation and/or evaluation to fail due to a circular > module dependency. > > * gnu/packages/embedded.scm: Add commentary. > (gcc-arm-none-eabi-4.9, gcc-arm-none-eabi-6, newlib-arm-none-eabi) > (newlib-nano-arm-none-eabi, gcc-arm-none-eabi-7-2018-q2-update) > (newlib-arm-none-eabi-7-2018-q2-update) > (newlib-nano-arm-none-eabi-7-2018-q2-update) > (arm-none-eabi-toolchain-4.9, arm-none-eabi-nano-toolchain-4.9) > (arm-none-eabi-toolchain-6, arm-none-eabi-nano-toolchain-6) > (arm-none-eabi-toolchain-7-2018-q2-update, gdb-arm-none-eabi) > (propeller-binutils, propeller-gcc-6, propeller-gcc-4) > (propeller-gcc, propeller-toolchain, propeller-development-suite) > (gcc-vc4): Turn into procedures, prefixing the procedure name with 'make-= ', > and adjust all users. > (make-libstdc++-arm-none-eabi) [arguments]: Avoid an unused warning. > (arm-none-eabi-toolchain): Rename to... > (make-arm-none-eabi-toolchain): ... this. > * gnu/packages/raspberry-pi.scm (raspi-arm-chainloader) [native-inputs]: > Replace gcc-arm-none-eabi-6 with (make-arm-none-eabi-toolchain). > * gnu/packages/axoloti.scm (axoloti-runtime) > [inputs]: Replace arm-none-eabi-nano-toolchain-4.9 > with (make-arm-none-eabi-nano-toolchain-4.9). > (axoloti-patcher): Likewise. > (axoloti-patcher-next) [inputs]: Replace > arm-none-eabi-nano-toolchain-7-2018-q2-update > with (make-arm-none-eabi-nano-toolchain-7-2018-q2-update). People will lose the ability to install those toolchains, for instance with =E2=80=98guix install propeller-toolchain=E2=80=99, or to upgrade prof= iles that contain them (though =E2=80=98guix install axoloti-runtime=E2=80=99 is stil= l good, for instance). I=E2=80=99m not sure whether that=E2=80=99s acceptable, but we should check= with known users of this, such as Ricardo. I=E2=80=99ve always felt that these toolchains should be provided as part o= f the =E2=80=9Cregular=E2=80=9D cross-compilation framework in cross-base.scm. P= ackages that always need to be cross-compiled (to AVR microcontrollers, etc.) would have a hardcoded #:target in their =E2=80=98arguments=E2=80=99 field. I fo= rgot why this was rejected. Thanks, Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 13 Sep 2023 20:06:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 13 16:06:53 2023 Received: from localhost ([127.0.0.1]:36129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qgW8T-0006pk-6f for submit <at> debbugs.gnu.org; Wed, 13 Sep 2023 16:06:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1qgW8R-0006pX-EB for 65860 <at> debbugs.gnu.org; Wed, 13 Sep 2023 16:06:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1qgW8D-0006j7-4s; Wed, 13 Sep 2023 16:06:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Xwu7U/Gfm4O0O1B4FsbR1G4ahlM+BXBPeeVQzFye7wY=; b=DbRWErmOU2QeOxpOGEq8 ZTxYkIydTIFNm9ffNqGVL+6CRDn765YIjLmk65glILjZO1ef0U2A56HWl2BRXQa5RVQihd+ct57aR Uj1JaFaVKe58MS5ovjQgLjMoEEQ32txOk/a6Rqx7jHdmJg0Zj0JeFU7J9d5zfXTpcOzRuwpAOo+7f CxWNBZM226Lsl6el4b3C+DX0z8/cIiqSGRu9iFuei3a4/jYHAbShrxCxlttFET7AWDNMadfWPezdv oGTddZVXQ23PHDKmWqBdQZOI3+QF3dvnfyCZtBXzd/vZxFz0buidNcHqpZyM9n4AW5W5DQq8CAhL1 GlUDAK7oOHd1HQ==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> To: Maxim Cournoyer <maxim.cournoyer@HIDDEN> Subject: Re: [bug#65860] [PATCH 3/4] gnu: Remove extraneous imports. References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> <bc65388b056610e75bd56abb4bc3481e3b9c0035.1694406359.git.maxim.cournoyer@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 27 Fructidor an 231 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de la Verge-d'or X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 13 Sep 2023 22:06:28 +0200 In-Reply-To: <bc65388b056610e75bd56abb4bc3481e3b9c0035.1694406359.git.maxim.cournoyer@HIDDEN> (Maxim Cournoyer's message of "Mon, 11 Sep 2023 00:25:59 -0400") Message-ID: <87cyylltx7.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65860 Cc: Ricardo Wurmus <rekado@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>, 65860 <at> debbugs.gnu.org, Efraim Flashner <efraim@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Hi, Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis: > Found by running 'guild compile -W3 gnu/packages/$module.scm', using guild > from the upcoming Guile. Excellent, go for it! (The was the motivation for =E2=80=98-Wunused-modules=E2=80=99.) Ludo=E2=80=99.
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 11 Sep 2023 04:27:01 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 11 00:27:01 2023 Received: from localhost ([127.0.0.1]:51796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfYVp-0005a8-3q for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:27:01 -0400 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]:58718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYVn-0005Za-6l for 65860 <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:27:00 -0400 Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-64a5f9a165eso22684446d6.1 for <65860 <at> debbugs.gnu.org>; Sun, 10 Sep 2023 21:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694406409; x=1695011209; 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=qZypnKqMIWx8K8eRkflYklhJ9uH6uJBtpu43mfr+Z08=; b=n36VRssqRGfEk4WTLhCmd/RGc2Z/0v2GLp7XHGiVbZlLkwQm1VHgWPM0sALmo4A72A 4cEXy/wdPVcQPGTz0ozOAMpzI6gy0Z6xfaxDGKajE4yZqhUnAT+Ts/z6Ng49l5gW5rr9 voyC4hFrNynM33PpcG1h0Bs8pDKqLbB6Q28ojt1pC2mB1xBQL/q4ZFmEjl8WuKmAlsGy U0zpFdEhRHhG2WwlGKIqTeVqsuZAxtKjWO2c+JV8BcdMjywQOVXSvX/QwgAlXPsfi+qu ropCQUf78C5pCOcUnjeZ9hM939ZlHoWmDgAdy/csINoApzjoTJlnmmXuT1PIfWuMZ26D gCcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694406409; x=1695011209; 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=qZypnKqMIWx8K8eRkflYklhJ9uH6uJBtpu43mfr+Z08=; b=YTPecb1tWKGy5L7+nM7yUu17xFWaxB9ZKdD6lEiNRqI73XcmH53O/GhPm8ccCKcmhU JrezGSxTrwws+R8Vv4vxmrs7NEI5ILy4iwu2N6pxuWcJAxNvovRmOx91d458DBMSUYQw mRf1Sqcxi7f08LzbqNU+zwekEzMeOfb1qNeMg2VRcv5s/rTK8rC1NV9vox0fHeBC9D3+ +SnybnKe3F/Umwc5jyjXvQyfocBgPlk0tPgmhyNbrGcNxA0O5csrMYHg02Wu98+oq8L4 TiSAAPmzZ+xXReH+99p/OUTuCp92E3gSwkJKrmvJfRFnW3sfYB0Nz8arSuHFgcprh+tV 87cA== X-Gm-Message-State: AOJu0YxRT7uUUNDUmzEW3hhE6dGYe8qMo8otM1SQ8UbpicealoGSrUwA OjKbeDmWI5gx9KZCBWWJgTBpfbu/2Vo= X-Google-Smtp-Source: AGHT+IFpwgVmSPMONm7SPS0ay6UfU5vTD0t8IwBtDX2x8r0/oY0S/3dywa7oAub8IP369DR75TAHpQ== X-Received: by 2002:a0c:9e89:0:b0:64f:50e2:c559 with SMTP id r9-20020a0c9e89000000b0064f50e2c559mr7762123qvd.2.1694406409460; Sun, 10 Sep 2023 21:26:49 -0700 (PDT) Received: from localhost.localdomain (dsl-155-89.b2b2c.ca. [66.158.155.89]) by smtp.gmail.com with ESMTPSA id c8-20020a0cf2c8000000b0064f778c8165sm2608923qvm.64.2023.09.10.21.26.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 21:26:49 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH 4/4] doc: Add new 'Circular Module Dependencies' section. Date: Mon, 11 Sep 2023 00:26:00 -0400 Message-ID: <cd03c264f30168e220dcc63f5e112bf518b92f2d.1694406360.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694406359.git.maxim.cournoyer@HIDDEN> References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: mhw@HIDDEN, Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) * doc/contributing.texi (Circular Module Dependencies): New subsection. --- doc/contributing.texi | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/doc/contributing.texi b/doc/contributing.texi index a0da871f1a..67ceff4fdb 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -449,6 +449,7 @@ Packaging Guidelines * Version Numbers:: When the name is not enough. * Synopses and Descriptions:: Helping users find the right package. * Snippets versus Phases:: Whether to use a snippet, or a build phase. +* Cyclic Module Dependencies:: Going full circle. * Emacs Packages:: Your Elisp fix. * Python Modules:: A touch of British comedy. * Perl Modules:: Little pearls. @@ -720,6 +721,61 @@ Snippets versus Phases using build phases. Refer to the @code{origin} record documentation for more information (@pxref{origin Reference}). +@node Cyclic Module Dependencies +@subsection Cyclic Module Dependencies + +While there cannot be circular dependencies between packages, Guile's +lax module loading mechanism allows circular dependencies between Guile +modules, which doesn't cause problems as long as the following +conditions are followed for two modules part of a dependency cycle: + +@cindex rules to cope with circular module dependencies +@enumerate +@item +Macros are not shared between the co-dependent modules +@item +Top-level variables are only referenced in delayed (@i{thunked}) package +fields: @code{arguments}, @code{native-inputs}, @code{inputs}, +@code{propagated-inputs} or @code{replacement} +@item +Procedures referencing top-level variables from another module are not +called at the top level of a module themselves. +@end enumerate + +Straying away from the above rules may work while there are no +dependency cycles between modules, but given such cycles are confusing +and difficult to troubleshoot, it is best to follow the rules to avoid +introducing problems down the line. + +@noindent +Here is a common trap to avoid: + +@lisp +(define-public avr-binutils + (package + (inherit (cross-binutils "avr")) + (name "avr-binutils"))) +@end lisp + +In the above example, the @code{avr-binutils} package was defined in the +module @code{(gnu packages avr)}, and the @code{cross-binutils} +procedure in @code{(gnu packages cross-base)}. Because the +@code{inherit} field is not delayed (thunked), it is evaluated at the +top level at load time, which is problematic in the presence of module +dependency cycles. This could be resolved by turning the package into a +procedure instead, like: + +@lisp +(define (make-avr-binutils) + (package + (inherit (cross-binutils "avr")) + (name "avr-binutils"))) +@end lisp + +Care would need to be taken to ensure the above procedure is only ever +used in a package delayed fields or within another procedure also not +called at the top level. + @node Emacs Packages @subsection Emacs Packages -- 2.41.0
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 11 Sep 2023 04:26:58 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 11 00:26:58 2023 Received: from localhost ([127.0.0.1]:51793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfYVk-0005Zp-OR for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:58 -0400 Received: from mail-qk1-x736.google.com ([2607:f8b0:4864:20::736]:48474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYVh-0005ZL-Ga for 65860 <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:55 -0400 Received: by mail-qk1-x736.google.com with SMTP id af79cd13be357-77058512c18so217084685a.1 for <65860 <at> debbugs.gnu.org>; Sun, 10 Sep 2023 21:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694406404; x=1695011204; 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=DvfIM7rcDcP8szw7AJNd6aEAv6bumHcU1QdJUJvTK7k=; b=jKbWVRkVdesWMFRa744NlPrf2StiVLKuuWzYzKNaFAJnRS9NEtZMTxRSzfzXvnNP7Y VRbMqd6ctj5WaBhuVYRtz5gaT3DRbO+fnl64z6OcDhNmVSaq6d90lzL5/Pjzas9N4U4i fqba1VINOWxD16C2RojIou49RpiMdRgjkzPOjlrUQ4YT707v2SrjsttRv2bpF+YHxN+Z joQXPywnB3nXKqYoPCg1Ba0ueXten51zS1Dm7vI6LIbULj3dCuIoLO2ukMHSjpTZVCtN t+8ALK8fgWDEf9MGBSKci230+AdBnJY5Xmfq6+LdqGNjDwTSu3YwLinj3iazGZjqwCOD MhoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694406404; x=1695011204; 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=DvfIM7rcDcP8szw7AJNd6aEAv6bumHcU1QdJUJvTK7k=; b=YqWuzi+/IDYoaMHRNXF1yr0GviWEQXTChJFOuPkhXge6teey0CknK82xtwYVwBHV3J g8ON14gdSrRqAHOlB3bGyIJxGBhW/4szGJhVMpdn9dK7epEm/PdOOE9O/koJ8IkeA8Hg SSaUUKQ10duYEHCegsT4aBY2pgMwjGM48El7Phdj001tcVImJav6FNI15THmgJmaKeq6 hietiTZPkVqxIxGLbX4hzm9Couz/9T3Y9oqn4Cv/i6FOe75V0xQ1MokI6XPZ1UYwb7ku 78X2HTHcgB1c/o03Nn0v7YEuCxhqHFXsNvqtk9vCEt8wlJQMbzzEwn44SEfaecl4MmVV Uyow== X-Gm-Message-State: AOJu0Yy9dHhMDSCjHfqJmud+R+osFscLsrxzw75JmCfVla9iXVgsr01y DQ/5sBWTLgTIbYgg7cxNx+KL7DfHO0c= X-Google-Smtp-Source: AGHT+IGjZGP17q+dsJYRw5f6ZAcJ4hCvomG7Wq8oNapXTmHiieKutBHgiKSDiWW3qhuLsEDQnOd+0g== X-Received: by 2002:a0c:b319:0:b0:649:384f:edc with SMTP id s25-20020a0cb319000000b00649384f0edcmr7609410qve.2.1694406403764; Sun, 10 Sep 2023 21:26:43 -0700 (PDT) Received: from localhost.localdomain (dsl-155-89.b2b2c.ca. [66.158.155.89]) by smtp.gmail.com with ESMTPSA id c8-20020a0cf2c8000000b0064f778c8165sm2608923qvm.64.2023.09.10.21.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 21:26:43 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH 3/4] gnu: Remove extraneous imports. Date: Mon, 11 Sep 2023 00:25:59 -0400 Message-ID: <bc65388b056610e75bd56abb4bc3481e3b9c0035.1694406359.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694406359.git.maxim.cournoyer@HIDDEN> References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 X-Debbugs-Cc: Efraim Flashner <efraim@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Ricardo Wurmus <rekado@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN> Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Found by running 'guild compile -W3 gnu/packages/$module.scm', using guild from the upcoming Guile. * gnu/packages/admin.scm: Remove extraneous imports. * gnu/packages/avr.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bootloaders.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/linphone.scm: Likewise. * gnu/packages/telephony.scm: Likewise. * gnu/packages/cran.scm: Likewise. * gnu/packages/kde.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/mes.scm: Likewise. * gnu/packages/mingw.scm: Likewise. * gnu/packages/serialization.scm: Likewise. * gnu/packages/sync.scm: Likewise. * gnu/packages/syncthing.scm: Likewise. * gnu/packages/terminals.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/emulators.scm: Likewise. --- gnu/packages/admin.scm | 5 ----- gnu/packages/avr.scm | 1 - gnu/packages/base.scm | 1 - gnu/packages/bootloaders.scm | 2 -- gnu/packages/cran.scm | 2 -- gnu/packages/emulators.scm | 3 --- gnu/packages/firmware.scm | 4 ---- gnu/packages/kde.scm | 3 --- gnu/packages/libcanberra.scm | 6 +----- gnu/packages/libreoffice.scm | 4 ---- gnu/packages/linphone.scm | 4 ---- gnu/packages/mes.scm | 5 ----- gnu/packages/mingw.scm | 6 ------ gnu/packages/serialization.scm | 5 +---- gnu/packages/sync.scm | 2 -- gnu/packages/syncthing.scm | 2 -- gnu/packages/telephony.scm | 12 ------------ gnu/packages/terminals.scm | 1 - gnu/packages/version-control.scm | 2 -- gnu/packages/video.scm | 7 ------- gnu/packages/wm.scm | 3 --- 21 files changed, 2 insertions(+), 78 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5d586e6f36..a1229c11d0 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -101,7 +101,6 @@ (define-module (gnu packages admin) #:use-module (gnu packages acl) #:use-module (gnu packages algebra) #:use-module (gnu packages attr) - #:use-module (gnu packages autogen) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) @@ -112,7 +111,6 @@ (define-module (gnu packages admin) #:use-module (gnu packages compression) #:use-module (gnu packages crates-graphics) #:use-module (gnu packages crates-io) - #:use-module (gnu packages cross-base) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages curl) @@ -140,7 +138,6 @@ (define-module (gnu packages admin) #:use-module (gnu packages inkscape) #:use-module (gnu packages kerberos) #:use-module (gnu packages libbsd) - #:use-module (gnu packages libftdi) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) @@ -160,11 +157,9 @@ (define-module (gnu packages admin) #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages polkit) - #:use-module (gnu packages popt) #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) - #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index abca60eeac..2c107c6f60 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -31,7 +31,6 @@ (define-module (gnu packages avr) #:use-module (guix packages) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) - #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 5a3d5aced5..702e243270 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -49,7 +49,6 @@ (define-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages ed) - #:use-module (gnu packages gawk) #:use-module (gnu packages gcc) #:use-module (gnu packages guile) #:use-module (gnu packages multiprecision) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 1c47636341..1124eca837 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -36,8 +36,6 @@ (define-module (gnu packages bootloaders) #:use-module (gnu packages) - #:use-module (gnu packages admin) - #:use-module (gnu packages algebra) #:use-module (gnu packages assembly) #:use-module (gnu packages base) #:use-module (gnu packages disk) diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index b6a01a99b0..dc3efcaf43 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -62,7 +62,6 @@ (define-module (gnu packages cran) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system r) - #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages base) @@ -79,7 +78,6 @@ (define-module (gnu packages cran) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages gnome) - #:use-module (gnu packages graph) #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages icu4c) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 1d50c9ef01..ce61f935fb 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -56,7 +56,6 @@ (define-module (gnu packages emulators) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) - #:use-module (gnu packages build-tools) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) #:use-module (gnu packages compression) @@ -72,7 +71,6 @@ (define-module (gnu packages emulators) #:use-module (gnu packages freedesktop) #:use-module (gnu packages fribidi) #:use-module (gnu packages game-development) - #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -102,7 +100,6 @@ (define-module (gnu packages emulators) #:use-module (gnu packages upnp) #:use-module (gnu packages video) #:use-module (gnu packages vulkan) - #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 2e2c4af796..cbb24230de 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -40,7 +40,6 @@ (define-module (gnu packages firmware) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages admin) - #:use-module (gnu packages autotools) #:use-module (gnu packages assembly) #:use-module (gnu packages backup) #:use-module (gnu packages base) @@ -58,7 +57,6 @@ (define-module (gnu packages firmware) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) - #:use-module (gnu packages gnupg) #:use-module (gnu packages gtk) #:use-module (gnu packages hardware) #:use-module (gnu packages libusb) @@ -71,13 +69,11 @@ (define-module (gnu packages firmware) #:use-module (gnu packages polkit) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) - #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz) #:use-module (gnu packages shells) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) - #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (ice-9 match)) diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 9e5ac767b8..20fbb41d73 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -36,13 +36,11 @@ (define-module (gnu packages kde) #:use-module (guix build-system cmake) #:use-module (guix build-system qt) - #:use-module (guix deprecation) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) - #:use-module (guix utils) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages apr) @@ -69,7 +67,6 @@ (define-module (gnu packages kde) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gimp) - #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gperf) diff --git a/gnu/packages/libcanberra.scm b/gnu/packages/libcanberra.scm index c0ec47a445..cf38ac113e 100644 --- a/gnu/packages/libcanberra.scm +++ b/gnu/packages/libcanberra.scm @@ -25,10 +25,8 @@ (define-module (gnu packages libcanberra) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) - #:use-module (guix utils) #:use-module (gnu packages autotools) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) @@ -36,9 +34,7 @@ (define-module (gnu packages libcanberra) #:use-module (gnu packages linux) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages python) - #:use-module (gnu packages xiph) - #:use-module ((srfi srfi-1) #:select (alist-delete))) + #:use-module (gnu packages xiph)) (define-public libcanberra (package diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index d06166e64a..71131ca1f3 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -44,7 +44,6 @@ (define-module (gnu packages libreoffice) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module (gnu packages aidc) - #:use-module (gnu packages aspell) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) @@ -73,10 +72,8 @@ (define-module (gnu packages libreoffice) #:use-module (gnu packages hunspell) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) - #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages logging) - #:use-module (gnu packages m4) #:use-module (gnu packages maths) #:use-module (gnu packages nss) #:use-module (gnu packages openldap) @@ -87,7 +84,6 @@ (define-module (gnu packages libreoffice) #:use-module (gnu packages python) #:use-module (gnu packages rdf) #:use-module (gnu packages scanner) - #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages xml) diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm index 7d87ee602c..48a30f32d0 100644 --- a/gnu/packages/linphone.scm +++ b/gnu/packages/linphone.scm @@ -34,11 +34,8 @@ (define-module (gnu packages linphone) #:use-module (gnu packages documentation) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) - #:use-module (gnu packages glib) #:use-module (gnu packages gnome) - #:use-module (gnu packages gnome-xyz) #:use-module (gnu packages graphviz) - #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages linux) #:use-module (gnu packages ncurses) @@ -49,7 +46,6 @@ (define-module (gnu packages linphone) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages java) #:use-module (gnu packages sqlite) #:use-module (gnu packages telephony) #:use-module (gnu packages tls) diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index 4176977375..a7924d943d 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -24,15 +24,10 @@ (define-module (gnu packages mes) #:use-module (gnu packages) #:use-module (gnu packages base) - #:use-module (gnu packages bash) - #:use-module (gnu packages bootstrap) - #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) - #:use-module (gnu packages gcc) #:use-module (gnu packages graphviz) #:use-module (gnu packages guile) #:use-module (gnu packages man) - #:use-module (gnu packages package-management) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm index 4eeefe1490..0ac6f0e767 100644 --- a/gnu/packages/mingw.scm +++ b/gnu/packages/mingw.scm @@ -22,16 +22,10 @@ (define-module (gnu packages mingw) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) - #:use-module (gnu packages base) #:use-module (gnu packages cross-base) - #:use-module (gnu packages gcc) - #:use-module (gnu packages compression) - #:use-module (gnu packages multiprecision) #:use-module (guix build-system gnu) #:use-module (guix packages) #:use-module (guix download) - #:use-module (guix utils) - #:use-module (ice-9 match) #:export (make-mingw-w64)) (define* (make-mingw-w64 machine diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index c17d417d5e..d0b4bd2735 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -52,8 +52,6 @@ (define-module (gnu packages serialization) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) - #:use-module (gnu packages cmake) - #:use-module (gnu packages cpp) #:use-module (gnu packages databases) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -64,8 +62,7 @@ (define-module (gnu packages serialization) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-science) - #:use-module (gnu packages python-xyz) - #:use-module (gnu packages perl)) + #:use-module (gnu packages python-xyz)) (define-public avro-cpp-1.9 (package diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index 8235332cb0..c4410c67fd 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -50,7 +50,6 @@ (define-module (gnu packages sync) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) - #:use-module (gnu packages golang) #:use-module (gnu packages graphviz) #:use-module (gnu packages image) #:use-module (gnu packages kde-frameworks) @@ -62,7 +61,6 @@ (define-module (gnu packages sync) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages rsync) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index 414395251b..57f5235616 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -38,9 +38,7 @@ (define-module (gnu packages syncthing) #:use-module (gnu packages golang) #:use-module (gnu packages gtk) #:use-module (gnu packages linux) - #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) - #:use-module (gnu packages python-xyz) #:use-module (gnu packages time)) (define-public syncthing diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index aa65c4eaad..42158784ca 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -44,7 +44,6 @@ (define-module (gnu packages telephony) #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages admin) - #:use-module (gnu packages aidc) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) @@ -52,23 +51,17 @@ (define-module (gnu packages telephony) #:use-module (gnu packages base) #:use-module (gnu packages boost) #:use-module (gnu packages check) - #:use-module (gnu packages compression) #:use-module (gnu packages cpp) - #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages sqlite) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages file) #:use-module (gnu packages protobuf) - #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) - #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) - #:use-module (gnu packages gtk) #:use-module (gnu packages image) - #:use-module (gnu packages libcanberra) #:use-module (gnu packages libusb) #:use-module (gnu packages linphone) #:use-module (gnu packages linux) @@ -77,7 +70,6 @@ (define-module (gnu packages telephony) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) #:use-module (gnu packages networking) - #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) @@ -85,12 +77,8 @@ (define-module (gnu packages telephony) #:use-module (gnu packages qt) #:use-module (gnu packages samba) #:use-module (gnu packages security-token) - #:use-module (gnu packages serialization) #:use-module (gnu packages speech) #:use-module (gnu packages tls) - #:use-module (gnu packages upnp) - #:use-module (gnu packages video) - #:use-module (gnu packages webkit) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module (gnu packages xml) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 43aeac9fd7..aedf9309e0 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -102,7 +102,6 @@ (define-module (gnu packages terminals) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-check) - #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages serialization) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 86dcea908c..cf3c4d4e19 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -115,7 +115,6 @@ (define-module (gnu packages version-control) #:use-module (gnu packages ncurses) #:use-module (gnu packages ssh) #:use-module (gnu packages web) - #:use-module (gnu packages openstack) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) @@ -128,7 +127,6 @@ (define-module (gnu packages version-control) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages readline) - #:use-module (gnu packages rsync) #:use-module (gnu packages ruby) #:use-module (gnu packages sqlite) #:use-module (gnu packages texinfo) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 153fe354d5..d959a7bcc4 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -117,10 +117,8 @@ (define-module (gnu packages video) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages boost) - #:use-module (gnu packages build-tools) #:use-module (gnu packages cdrom) #:use-module (gnu packages check) - #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages crates-io) @@ -131,7 +129,6 @@ (define-module (gnu packages video) #:use-module (gnu packages dns) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) - #:use-module (gnu packages elf) #:use-module (gnu packages file) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) @@ -157,9 +154,7 @@ (define-module (gnu packages video) #:use-module (gnu packages libidn) #:use-module (gnu packages libusb) #:use-module (gnu packages linux) - #:use-module (gnu packages llvm) #:use-module (gnu packages lua) - #:use-module (gnu packages m4) #:use-module (gnu packages man) #:use-module (gnu packages markup) #:use-module (gnu packages maths) @@ -188,7 +183,6 @@ (define-module (gnu packages video) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages rdesktop) #:use-module (gnu packages re2c) #:use-module (gnu packages ruby) #:use-module (gnu packages rust-apps) @@ -208,7 +202,6 @@ (define-module (gnu packages video) #:use-module (gnu packages version-control) #:use-module (gnu packages vulkan) #:use-module (gnu packages web) - #:use-module (gnu packages webkit) #:use-module (gnu packages wget) #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xdisorg) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index aaff618248..48dd29071a 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -131,9 +131,7 @@ (define-module (gnu packages wm) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages logging) #:use-module (gnu packages lua) - #:use-module (gnu packages m4) #:use-module (gnu packages man) - #:use-module (gnu packages maths) #:use-module (gnu packages mpd) #:use-module (gnu packages pciutils) #:use-module (gnu packages music) @@ -153,7 +151,6 @@ (define-module (gnu packages wm) #:use-module (gnu packages texinfo) #:use-module (gnu packages textutils) #:use-module (gnu packages time) - #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) -- 2.41.0
efraim@HIDDEN, ludo@HIDDEN, maxim.cournoyer@HIDDEN, rekado@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 11 Sep 2023 04:26:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 11 00:26:55 2023 Received: from localhost ([127.0.0.1]:51790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfYVh-0005ZZ-FH for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:55 -0400 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:58505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYVc-0005Z4-MD for 65860 <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:51 -0400 Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-76ef6d98d7eso210260485a.0 for <65860 <at> debbugs.gnu.org>; Sun, 10 Sep 2023 21:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694406399; x=1695011199; 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=DRE4JRb7iNjm3ekwpSqZYCPN5/4bM/xfUpKa7teAPDs=; b=UKkzX7UM0/ygnP2hRAQwIHEYT/TVxT2giG3ctWARpdH2dd6Va70ZVOu+Fpk0x2R1Tg iqhqFnVApPANvZczlka1k6wCZKsozeNsJW33gpzaNuEMFFIOjCwyFsPSLINUEB81LyNB WA0hOtcLU3Wb3NnSEo9yIhUyCzh3og+Ls7plcpWlEB5rBKPGaOUTYNmwJXXuiLtWDSsj 142GFUy3FRQ4l7I6DLbTFB3yhwt8ORJj7CtevpN3Rsvb4GvNxsCopWkjkRRp/cy5PJag vZnP6cppWe8SgI92dQ6ZhyMSE6F50MDR8ilQPdYPb4iq+N4kOM8aeU60n/lmq2OSz3GM 7WhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694406399; x=1695011199; 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=DRE4JRb7iNjm3ekwpSqZYCPN5/4bM/xfUpKa7teAPDs=; b=jsoW0JoimPDzJth0gl1QRoFzdej+T33jPXQtQlUvq/QbL1xlHyW152yLh+2lzPMvth fDgdOQSXo3qERGk5QoRi3Ul6nztJJ9ZckUprz5m1soBmEleipOztUlVXRNFCzKysCHqw FE57Z5QS8Yd5LZVvqt4YEKwJF7txyzEan/wntLxyA3KBynAFoTQriDDqGy5ldGJAZWTW 7zjfpn+MlZtCdRkURWFaEJX5WijF0UP+DhIERlvNgL8z7918/+XHhkjyCxP/teSA4G6x 3pcbeA0g4RfHOXCZ1nNadApNKrYnqIhn7tRL939nQeEmt30yopGJhBv/4jpJ8/J8GjHH fuIQ== X-Gm-Message-State: AOJu0Ywwzm4z3DwtO8HweRj8bXasWGvz9Hv6ehbPQkOOUnixTYDaQU/Y N39iDXmEnpY+/UcacnCXb8Zf5kAccCI= X-Google-Smtp-Source: AGHT+IELSe9OWZrUAb+PU+C2ngs2WkEhzdRxl9lwyNVYxa4ZHs6de455XcFGM+WJ9bXQ95zdTQRt7Q== X-Received: by 2002:a0c:cc8a:0:b0:63f:b926:4474 with SMTP id f10-20020a0ccc8a000000b0063fb9264474mr2364511qvl.0.1694406398651; Sun, 10 Sep 2023 21:26:38 -0700 (PDT) Received: from localhost.localdomain (dsl-155-89.b2b2c.ca. [66.158.155.89]) by smtp.gmail.com with ESMTPSA id c8-20020a0cf2c8000000b0064f778c8165sm2608923qvm.64.2023.09.10.21.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 21:26:38 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH 2/4] gnu: embedded: Turn packages using top-level variables into procedures. Date: Mon, 11 Sep 2023 00:25:58 -0400 Message-ID: <29c22d0230290ead9ca04fa3b01c17abfbdd3ed5.1694406359.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694406359.git.maxim.cournoyer@HIDDEN> References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Fixes <https://issues.guix.gnu.org/65716>. Before this change, simply adding the following import: modified gnu/packages/firmware.scm @@ -42,6 +42,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages assembly) + #:use-module (gnu packages avr) #:use-module (gnu packages backup) #:use-module (gnu packages base) #:use-module (gnu packages bash) Would cause byte compilation and/or evaluation to fail due to a circular module dependency. * gnu/packages/embedded.scm: Add commentary. (gcc-arm-none-eabi-4.9, gcc-arm-none-eabi-6, newlib-arm-none-eabi) (newlib-nano-arm-none-eabi, gcc-arm-none-eabi-7-2018-q2-update) (newlib-arm-none-eabi-7-2018-q2-update) (newlib-nano-arm-none-eabi-7-2018-q2-update) (arm-none-eabi-toolchain-4.9, arm-none-eabi-nano-toolchain-4.9) (arm-none-eabi-toolchain-6, arm-none-eabi-nano-toolchain-6) (arm-none-eabi-toolchain-7-2018-q2-update, gdb-arm-none-eabi) (propeller-binutils, propeller-gcc-6, propeller-gcc-4) (propeller-gcc, propeller-toolchain, propeller-development-suite) (gcc-vc4): Turn into procedures, prefixing the procedure name with 'make-', and adjust all users. (make-libstdc++-arm-none-eabi) [arguments]: Avoid an unused warning. (arm-none-eabi-toolchain): Rename to... (make-arm-none-eabi-toolchain): ... this. * gnu/packages/raspberry-pi.scm (raspi-arm-chainloader) [native-inputs]: Replace gcc-arm-none-eabi-6 with (make-arm-none-eabi-toolchain). * gnu/packages/axoloti.scm (axoloti-runtime) [inputs]: Replace arm-none-eabi-nano-toolchain-4.9 with (make-arm-none-eabi-nano-toolchain-4.9). (axoloti-patcher): Likewise. (axoloti-patcher-next) [inputs]: Replace arm-none-eabi-nano-toolchain-7-2018-q2-update with (make-arm-none-eabi-nano-toolchain-7-2018-q2-update). --- gnu/packages/axoloti.scm | 6 +- gnu/packages/embedded.scm | 322 +++++++++++++++++++--------------- gnu/packages/raspberry-pi.scm | 2 +- 3 files changed, 186 insertions(+), 144 deletions(-) diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm index e0dd22c627..7b36922860 100644 --- a/gnu/packages/axoloti.scm +++ b/gnu/packages/axoloti.scm @@ -199,7 +199,7 @@ (define-public axoloti-runtime ;; for compiling patches ("make" ,gnu-make) ;; for compiling firmware - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-4.9) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-4.9)) ;; for uploading compiled patches and firmware ("dfu-util" ,dfu-util-for-axoloti))) (native-inputs @@ -339,7 +339,7 @@ (define-public axoloti-patcher (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (inputs `(("icedtea" ,icedtea "jdk") - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-4.9) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-4.9)) ("java-simple-xml" ,java-simple-xml) ("java-rsyntaxtextarea" ,java-rsyntaxtextarea) ("java-usb4java" ,java-usb4java) @@ -572,7 +572,7 @@ (define-public axoloti-patcher-next (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (inputs `(("jdk" ,icedtea "jdk") - ("cross-toolchain" ,arm-none-eabi-nano-toolchain-7-2018-q2-update) + ("cross-toolchain" ,(make-arm-none-eabi-nano-toolchain-7-2018-q2-update)) ;; for compiling patches ("make" ,gnu-make) ;; for uploading compiled patches and firmware diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 325013a627..c84262b825 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2020, 2021, 2022 Simon South <simon@HIDDEN> ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@HIDDEN> ;;; Copyright © 2022 Mathieu Othacehe <othacehe@HIDDEN> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@HIDDEN> +;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@HIDDEN> ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@HIDDEN> ;;; ;;; This file is part of GNU Guix. @@ -73,14 +73,49 @@ (define-module (gnu packages embedded) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages xorg) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (make-gcc-arm-none-eabi-4.9 + make-gcc-arm-none-eabi-6 + make-gcc-arm-none-eabi-7-2018-q2-update + + make-gcc-vc4 + + make-newlib-arm-none-eabi + make-newlib-arm-none-eabi-7-2018-q2-update + + make-newlib-nano-arm-none-eabi + make-newlib-nano-arm-none-eabi-7-2018-q2-update + + make-arm-none-eabi-toolchain-4.9 + make-arm-none-eabi-toolchain-6 + make-arm-none-eabi-toolchain-7-2018-q2-update + + make-arm-none-eabi-nano-toolchain-4.9 + make-arm-none-eabi-nano-toolchain-6 + make-arm-none-eabi-nano-toolchain-7-2018-q2-update + + make-gdb-arm-none-eabi + + make-propeller-gcc + make-propeller-gcc-4 + make-propeller-gcc-6 + make-propeller-toolchain + make-propeller-development-suite)) + +;;; Commentary: +;;; +;;; This modules contains toolchain generators as well as packages for use in +;;; embedded contexts. Note: the toolchain and specialized packages are +;;; procedures, so as to delay their references to top level bindings such as +;;; 'gcc' or 'cross-gcc', etc. +;;; ;; We must not use the released GCC sources here, because the cross-compiler ;; does not produce working binaries. Instead we take the very same SVN ;; revision from the branch that is used for a release of the "GCC ARM ;; embedded" project on launchpad. ;; See https://launchpadlibrarian.net/218827644/release.txt -(define-public gcc-arm-none-eabi-4.9 +(define (make-gcc-arm-none-eabi-4.9) (let ((xgcc (cross-gcc "arm-none-eabi" #:xgcc gcc-4.9 #:xbinutils (cross-binutils "arm-none-eabi"))) @@ -167,9 +202,9 @@ (define-public gcc-arm-none-eabi-4.9 (variable "CROSS_LIBRARY_PATH") (files '("arm-none-eabi/lib")))))))) -(define-public gcc-arm-none-eabi-6 +(define (make-gcc-arm-none-eabi-6) (package - (inherit gcc-arm-none-eabi-4.9) + (inherit (make-gcc-arm-none-eabi-4.9)) (version (package-version gcc-6)) (source (origin (inherit (package-source gcc-6)) (patches @@ -178,7 +213,7 @@ (define-public gcc-arm-none-eabi-6 (search-patches "gcc-6-cross-environment-variables.patch" "gcc-6-arm-none-eabi-multilib.patch"))))))) -(define-public newlib-arm-none-eabi +(define (make-newlib-arm-none-eabi) (package (name "newlib") (version "2.4.0") @@ -211,7 +246,7 @@ (define-public newlib-arm-none-eabi #t))))) (native-inputs `(("xbinutils" ,(cross-binutils "arm-none-eabi")) - ("xgcc" ,gcc-arm-none-eabi-4.9) + ("xgcc" ,(make-gcc-arm-none-eabi-4.9)) ("texinfo" ,texinfo))) (home-page "https://www.sourceware.org/newlib/") (synopsis "C library for use on embedded systems") @@ -221,68 +256,70 @@ (define-public newlib-arm-none-eabi (license (license:non-copyleft "https://www.sourceware.org/newlib/COPYING.NEWLIB")))) -(define-public newlib-nano-arm-none-eabi - (package (inherit newlib-arm-none-eabi) - (name "newlib-nano") - (arguments - (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi) - ;; The configure flags are identical to the flags used by the "GCC ARM - ;; embedded" project. They optimize newlib for use on small embedded - ;; systems with limited memory. - ((#:configure-flags flags) - ''("--target=arm-none-eabi" - "--enable-multilib" - "--disable-newlib-supplied-syscalls" - "--enable-newlib-reent-small" - "--disable-newlib-fvwrite-in-streamio" - "--disable-newlib-fseek-optimization" - "--disable-newlib-wide-orient" - "--enable-newlib-nano-malloc" - "--disable-newlib-unbuf-stream-opt" - "--enable-lite-exit" - "--enable-newlib-global-atexit" - "--enable-newlib-nano-formatted-io" - "--disable-nls")) - ((#:phases phases) - `(modify-phases ,phases - ;; XXX: Most arm toolchains offer both *.a and *_nano.a as newlib - ;; and newlib-nano respectively. The headers are usually - ;; arm-none-eabi/include/newlib.h for newlib and - ;; arm-none-eabi/include/newlib-nano/newlib.h for newlib-nano. We - ;; have two different toolchain packages for each which works but - ;; is a little strange. - (add-after 'install 'hardlink-newlib - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; The nano.specs file says that newlib-nano files should end - ;; in "_nano.a" instead of just ".a". Note that this applies - ;; to all the multilib folders too. - (for-each - (lambda (file) - (link file - (string-append - ;; Strip ".a" off the end - (substring file 0 (- (string-length file) 2)) - ;; Add "_nano.a" onto the end - "_nano.a"))) - (find-files - out - "^(libc.a|libg.a|librdimon.a|libstdc\\+\\+.a|libsupc\\+\\+.a)$")) +(define (make-newlib-nano-arm-none-eabi) + (let ((base (make-newlib-arm-none-eabi))) + (package + (inherit base) + (name "newlib-nano") + (arguments + (substitute-keyword-arguments (package-arguments base) + ;; The configure flags are identical to the flags used by the "GCC ARM + ;; embedded" project. They optimize newlib for use on small embedded + ;; systems with limited memory. + ((#:configure-flags _) + ''("--target=arm-none-eabi" + "--enable-multilib" + "--disable-newlib-supplied-syscalls" + "--enable-newlib-reent-small" + "--disable-newlib-fvwrite-in-streamio" + "--disable-newlib-fseek-optimization" + "--disable-newlib-wide-orient" + "--enable-newlib-nano-malloc" + "--disable-newlib-unbuf-stream-opt" + "--enable-lite-exit" + "--enable-newlib-global-atexit" + "--enable-newlib-nano-formatted-io" + "--disable-nls")) + ((#:phases phases) + `(modify-phases ,phases + ;; XXX: Most arm toolchains offer both *.a and *_nano.a as newlib + ;; and newlib-nano respectively. The headers are usually + ;; arm-none-eabi/include/newlib.h for newlib and + ;; arm-none-eabi/include/newlib-nano/newlib.h for newlib-nano. We + ;; have two different toolchain packages for each which works but + ;; is a little strange. + (add-after 'install 'hardlink-newlib + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; The nano.specs file says that newlib-nano files should end + ;; in "_nano.a" instead of just ".a". Note that this applies + ;; to all the multilib folders too. + (for-each + (lambda (file) + (link file + (string-append + ;; Strip ".a" off the end + (substring file 0 (- (string-length file) 2)) + ;; Add "_nano.a" onto the end + "_nano.a"))) + (find-files + out + "^(libc.a|libg.a|librdimon.a|libstdc\\+\\+.a|libsupc\\+\\+.a)$")) - ;; newlib.h is usually in this location instead so both - ;; newlib and newlib-nano can be in the toolchain at the same - ;; time - (mkdir (string-append out "/arm-none-eabi/include/newlib-nano")) - (symlink - "../newlib.h" - (string-append out "/arm-none-eabi/include/newlib-nano/newlib.h")) - #t))))))) - (synopsis "Newlib variant for small systems with limited memory"))) + ;; newlib.h is usually in this location instead so both + ;; newlib and newlib-nano can be in the toolchain at the same + ;; time + (mkdir (string-append out "/arm-none-eabi/include/newlib-nano")) + (symlink + "../newlib.h" + (string-append out "/arm-none-eabi/include/newlib-nano/newlib.h")) + #t))))))) + (synopsis "Newlib variant for small systems with limited memory")))) ;;; The following definitions are for the "7-2018-q2-update" variant of the ;;; ARM cross toolchain as offered on https://developer.arm.com -(define-public gcc-arm-none-eabi-7-2018-q2-update +(define (make-gcc-arm-none-eabi-7-2018-q2-update) (let ((xgcc (cross-gcc "arm-none-eabi" #:xgcc gcc-7 #:xbinutils (cross-binutils "arm-none-eabi"))) @@ -370,13 +407,14 @@ (define-public gcc-arm-none-eabi-7-2018-q2-update (variable "CROSS_LIBRARY_PATH") (files '("arm-none-eabi/lib")))))))) -(define-public newlib-arm-none-eabi-7-2018-q2-update +(define (make-newlib-arm-none-eabi-7-2018-q2-update) ;; This is the same commit as used for the 7-2018-q2-update release ;; according to the release.txt. - (let ((commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4") + (let ((base ((make-newlib-arm-none-eabi))) + (commit "3ccfb407af410ba7e54ea0da11ae1e40b554a6f4") (revision "0")) (package - (inherit newlib-arm-none-eabi) + (inherit base) (version (git-version "3.0.0" revision commit)) (source (origin @@ -389,7 +427,7 @@ (define-public newlib-arm-none-eabi-7-2018-q2-update (base32 "1dq23fqrk75g1a4v7569fvnnw5q440zawbxi3w0g05n8jlqsmvcy")))) (arguments - (substitute-keyword-arguments (package-arguments newlib-arm-none-eabi) + (substitute-keyword-arguments (package-arguments base) ;; The configure flags are identical to the flags used by the "GCC ARM ;; embedded" project. ((#:configure-flags flags) @@ -399,15 +437,17 @@ (define-public newlib-arm-none-eabi-7-2018-q2-update ,flags)))) (native-inputs `(("xbinutils" ,(cross-binutils "arm-none-eabi")) - ("xgcc" ,gcc-arm-none-eabi-7-2018-q2-update) + ("xgcc" ,(make-gcc-arm-none-eabi-7-2018-q2-update)) ("texinfo" ,texinfo)))))) -(define-public newlib-nano-arm-none-eabi-7-2018-q2-update - (package (inherit newlib-arm-none-eabi-7-2018-q2-update) - (name "newlib-nano") - (arguments - (package-arguments newlib-nano-arm-none-eabi)) - (synopsis "Newlib variant for small systems with limited memory"))) +(define-public (make-newlib-nano-arm-none-eabi-7-2018-q2-update) + (let ((base (make-newlib-arm-none-eabi-7-2018-q2-update))) + (package + (inherit base) + (name "newlib-nano") + (arguments + (package-arguments base)) + (synopsis "Newlib variant for small systems with limited memory")))) (define (make-libstdc++-arm-none-eabi xgcc newlib) @@ -416,7 +456,7 @@ (define (make-libstdc++-arm-none-eabi xgcc newlib) (name "libstdc++-arm-none-eabi") (arguments (substitute-keyword-arguments (package-arguments libstdc++) - ((#:configure-flags flags) + ((#:configure-flags _) ``("--target=arm-none-eabi" "--host=arm-none-eabi" "--disable-libstdcxx-pch" @@ -434,7 +474,7 @@ (define (make-libstdc++-arm-none-eabi xgcc newlib) ("xgcc" ,xgcc) ,@(package-native-inputs libstdc++)))))) -(define (arm-none-eabi-toolchain xgcc newlib) +(define (make-arm-none-eabi-toolchain xgcc newlib) "Produce a cross-compiler toolchain package with the compiler XGCC and the C library variant NEWLIB." (let ((newlib-with-xgcc (package (inherit newlib) @@ -474,31 +514,31 @@ (define (arm-none-eabi-toolchain xgcc newlib) (home-page (package-home-page xgcc)) (license (package-license xgcc))))) -(define-public arm-none-eabi-toolchain-4.9 - (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 - newlib-arm-none-eabi)) +(define (make-arm-none-eabi-toolchain-4.9) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-4.9) + (make-newlib-arm-none-eabi))) -(define-public arm-none-eabi-nano-toolchain-4.9 - (arm-none-eabi-toolchain gcc-arm-none-eabi-4.9 - newlib-nano-arm-none-eabi)) +(define (make-arm-none-eabi-nano-toolchain-4.9) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-4.9) + (make-newlib-nano-arm-none-eabi))) -(define-public arm-none-eabi-toolchain-6 - (arm-none-eabi-toolchain gcc-arm-none-eabi-6 - newlib-arm-none-eabi)) +(define (make-arm-none-eabi-toolchain-6) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-6) + (make-newlib-arm-none-eabi))) -(define-public arm-none-eabi-nano-toolchain-6 - (arm-none-eabi-toolchain gcc-arm-none-eabi-6 - newlib-nano-arm-none-eabi)) +(define (make-arm-none-eabi-nano-toolchain-6) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-6) + (make-newlib-nano-arm-none-eabi))) -(define-public arm-none-eabi-toolchain-7-2018-q2-update - (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update - newlib-arm-none-eabi-7-2018-q2-update)) +(define (make-arm-none-eabi-toolchain-7-2018-q2-update) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-7-2018-q2-update) + (make-newlib-arm-none-eabi-7-2018-q2-update))) -(define-public arm-none-eabi-nano-toolchain-7-2018-q2-update - (arm-none-eabi-toolchain gcc-arm-none-eabi-7-2018-q2-update - newlib-nano-arm-none-eabi-7-2018-q2-update)) +(define (make-arm-none-eabi-nano-toolchain-7-2018-q2-update) + (make-arm-none-eabi-toolchain (make-gcc-arm-none-eabi-7-2018-q2-update) + (make-newlib-nano-arm-none-eabi-7-2018-q2-update))) -(define-public gdb-arm-none-eabi +(define (make-gdb-arm-none-eabi) (package (inherit gdb) (name "gdb-arm-none-eabi") @@ -647,7 +687,7 @@ (define-public openocd ;; personal correspondence with the developers in July 2017, more recent ;; versions are currently incompatible with the "Simple Libraries". -(define propeller-binutils +(define (make-propeller-binutils) (let ((xbinutils (cross-binutils "propeller-elf")) (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") (revision "2")) @@ -683,9 +723,9 @@ (define propeller-binutils ("dejagnu" ,dejagnu) ,@(package-native-inputs xbinutils)))))) -(define-public propeller-gcc-6 +(define (make-propeller-gcc-6) (let ((xgcc (cross-gcc "propeller-elf" - #:xbinutils propeller-binutils)) + #:xbinutils (make-propeller-binutils))) (commit "b4f45a4725e0b6d0af59e594c4e3e35ca4105867") (revision "1")) (package (inherit xgcc) @@ -719,8 +759,8 @@ (define-public propeller-gcc-6 (home-page "https://github.com/totalspectrum/gcc-propeller") (synopsis "GCC for the Parallax Propeller")))) -(define-public propeller-gcc-4 - (let ((xgcc propeller-gcc-6) +(define (make-propeller-gcc-4) + (let ((xgcc (make-propeller-gcc-6)) (commit "4c46ecbe79ffbecd2ce918497ace5b956736b5a3") (revision "2")) (package (inherit xgcc) @@ -742,13 +782,13 @@ (define-public propeller-gcc-4 (search-patches "gcc-4.6-gnu-inline.patch" "gcc-cross-environment-variables.patch"))))) (arguments - (substitute-keyword-arguments (package-arguments propeller-gcc-6) + (substitute-keyword-arguments (package-arguments xgcc) ((#:phases phases) #~(modify-phases #$phases (add-after 'unpack 'chdir (lambda _ (chdir "gcc"))))))) (native-inputs - (modify-inputs (package-native-inputs propeller-gcc-6) + (modify-inputs (package-native-inputs xgcc) (prepend gcc-4.9))) (home-page "https://github.com/parallaxinc/propgcc") (supported-systems (delete "aarch64-linux" %supported-systems))))) @@ -756,7 +796,7 @@ (define-public propeller-gcc-4 ;; Version 6 is experimental and may not work correctly. This is why we ;; default to version 4, which is also used in the binary toolchain bundle ;; provided by Parallax Inc. -(define-public propeller-gcc propeller-gcc-4) +(define make-propeller-gcc make-propeller-gcc-4) ;; FIXME: We do not build the tiny library because that would require C++ @@ -814,7 +854,7 @@ (define-public proplib (lambda* (#:key make-flags #:allow-other-keys) (apply invoke "make" "install-includes" make-flags)))))) (native-inputs - (list propeller-gcc propeller-binutils perl)) + (list (make-propeller-gcc) (make-propeller-binutils) perl)) (home-page "https://github.com/parallaxinc/propgcc") (synopsis "C library for the Parallax Propeller") (description "This is a C library for the Parallax Propeller @@ -823,22 +863,23 @@ (define-public proplib ;; included code is public domain and some changes are BSD licensed. (license license:expat)))) -(define-public propeller-toolchain - (package - (name "propeller-toolchain") - (version (package-version propeller-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("binutils" ,propeller-binutils) - ("libc" ,proplib) - ("gcc" ,propeller-gcc))) - (synopsis "Complete GCC tool chain for Propeller micro-controllers") - (description "This package provides a complete GCC tool chain for +(define (make-propeller-toolchain) + (let ((propeller-gcc (make-propeller-gcc))) + (package + (name "propeller-toolchain") + (version (package-version propeller-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("binutils" ,(make-propeller-binutils)) + ("libc" ,proplib) + ("gcc" ,propeller-gcc))) + (synopsis "Complete GCC tool chain for Propeller micro-controllers") + (description "This package provides a complete GCC tool chain for Propeller micro-controller development.") - (home-page (package-home-page propeller-gcc)) - (license (package-license propeller-gcc)))) + (home-page (package-home-page propeller-gcc)) + (license (package-license propeller-gcc))))) (define-public openspin (package @@ -906,7 +947,7 @@ (define-public propeller-load (lambda _ (chdir "loader") #t)) (delete 'configure)))) (native-inputs - (list openspin propeller-toolchain)) + (list openspin (make-propeller-toolchain))) (home-page "https://github.com/parallaxinc/propgcc") (synopsis "Loader for Parallax Propeller micro-controllers") (description "This package provides the tool @code{propeller-load} to @@ -951,7 +992,7 @@ (define-public spin2cpp '("testlex" "spin2cpp" "fastspin"))) #t))))) (native-inputs - (list bison propeller-load propeller-toolchain)) + (list bison propeller-load (make-propeller-toolchain))) (home-page "https://github.com/totalspectrum/spin2cpp") (synopsis "Convert Spin code to C, C++, or PASM code") (description "This is a set of tools for converting the Spin language for @@ -997,26 +1038,27 @@ (define-public spinsim two-thirds of the opcodes in the P2 instruction set.") (license license:expat)))) -(define-public propeller-development-suite - (package - (name "propeller-development-suite") - (version (package-version propeller-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("toolchain" ,propeller-toolchain) - ("openspin" ,openspin) - ("propeller-load" ,propeller-load) - ("spin2cpp" ,spin2cpp) - ("spinsim" ,spinsim))) - (synopsis "Complete development suite for Propeller micro-controllers") - (description "This meta-package provides a complete environment for the +(define (make-propeller-development-suite) + (let ((propeller-gcc (make-propeller-gcc))) + (package + (name "propeller-development-suite") + (version (package-version propeller-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("toolchain" ,(make-propeller-toolchain)) + ("openspin" ,openspin) + ("propeller-load" ,propeller-load) + ("spin2cpp" ,spin2cpp) + ("spinsim" ,spinsim))) + (synopsis "Complete development suite for Propeller micro-controllers") + (description "This meta-package provides a complete environment for the development with Parallax Propeller micro-controllers. It includes the GCC toolchain, the loader, the Openspin compiler, the Spin2cpp tool, and the Spin simulator.") - (home-page (package-home-page propeller-gcc)) - (license (package-license propeller-gcc)))) + (home-page (package-home-page propeller-gcc)) + (license (package-license propeller-gcc))))) (define-public binutils-vc4 (let ((commit "708acc851880dbeda1dd18aca4fd0a95b2573b36")) @@ -1070,7 +1112,7 @@ (define-public binutils-vc4 (license license:gpl3+) (home-page "https://github.com/puppeh/vc4-toolchain/")))) -(define-public gcc-vc4 +(define (make-gcc-vc4) (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377") (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4))) (package (inherit xgcc) diff --git a/gnu/packages/raspberry-pi.scm b/gnu/packages/raspberry-pi.scm index a866a7e4f2..80bfaf0896 100644 --- a/gnu/packages/raspberry-pi.scm +++ b/gnu/packages/raspberry-pi.scm @@ -177,7 +177,7 @@ (define-public raspi-arm-chainloader #t)))))) (native-inputs `(("binutils" ,(cross-binutils "arm-none-eabi")) - ("gcc" ,gcc-arm-none-eabi-6))) + ("gcc" ,(make-gcc-arm-none-eabi-6)))) (inputs `()) (synopsis "Raspberry Pi ARM bootloader") -- 2.41.0
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at 65860) by debbugs.gnu.org; 11 Sep 2023 04:26:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 11 00:26:48 2023 Received: from localhost ([127.0.0.1]:51787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfYVb-0005ZF-Ov for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:48 -0400 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:49515) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYVY-0005Yz-BR for 65860 <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:26:46 -0400 Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-414b3da2494so25139631cf.3 for <65860 <at> debbugs.gnu.org>; Sun, 10 Sep 2023 21:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694406394; x=1695011194; 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=CSa1jUz5LyAym01PJQ8druO+zhYj1EoNYEx05pBCnoM=; b=T1rAKvFp7MmGwsc+z+YdAJjiYMTUrFs/bF9p7eVCBC19o9gE2henkNiTmEQXoybYD0 Y+dylJnyfMPExIAGNCVUzGeYR5Bp/R1tTG/+MeBwxM68Np96L5bdEQETJaj6DjfMJZQD NFYpVpY+b6cjeJKQwOm5Kb1jM/EFnr+dXwMdh43y+kS09SMCo7391MVESkGQE/gV3W1Q 05P4jV6fcxuHxgI59lKuBheywakzurlrqXM3LnRqfwg5Er6VXewl170KR9YbX/fz9oqY jyVW393ZXUcLhtU8qpEJcC0ByVymWL9OcBkj6zkNuoU8yTT9uZMf2dQxCilwct7iZ+IK FxkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694406394; x=1695011194; 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=CSa1jUz5LyAym01PJQ8druO+zhYj1EoNYEx05pBCnoM=; b=moehU15h/ER+ugG6+rLDWB9+xqnOscz1oSTcn5Fmol9+X1WzMcBcSejvbTl+BdTTFr HTIqKHhgz9YP6tWX5OOD40GEmcZB5CRHozDvPVmBMH/7Tas13rNNfBsIqlwaVL6qeUBq F3Ny6bWLgnY3t/2ak0dWIu48+eGqetd9aNSUZ+mxaM59GYfFWBU7cmnPSZDuDTh+QYRL QWpAoS85DZIVBCDs2/tTERgiS8RjqrE6mNejNQjg1tbcJi7Q5FCK38V870rxiCh3rJU5 /82AdwsHec5X4S8k3YveFhl+AADy08h46bvkkbuz1q1DdA1BjPZ5IakVWONWlYSyAP+K mDiQ== X-Gm-Message-State: AOJu0YyXCAH0s9AqqDTr36YVIdON7vDD+yj3wOEwea2PBqTXR2HMGpNq olEqutICq3YUrH1+4v989+jFGIT5Vq4= X-Google-Smtp-Source: AGHT+IGHxOuQlThXG1+xHOks1npJPGb0O7Vn3V3IpV749/uFdvLqabGT4nHH6B6C8gCD9FBA7bxD4g== X-Received: by 2002:a05:622a:4cd:b0:412:d0b:12b5 with SMTP id q13-20020a05622a04cd00b004120d0b12b5mr8919445qtx.45.1694406394401; Sun, 10 Sep 2023 21:26:34 -0700 (PDT) Received: from localhost.localdomain (dsl-155-89.b2b2c.ca. [66.158.155.89]) by smtp.gmail.com with ESMTPSA id c8-20020a0cf2c8000000b0064f778c8165sm2608923qvm.64.2023.09.10.21.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 21:26:33 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: 65860 <at> debbugs.gnu.org Subject: [PATCH 1/4] gnu: avr: Delay all cross compilation packages. Date: Mon, 11 Sep 2023 00:25:57 -0400 Message-ID: <dbe1824a3b222919340538d30ef3948092ba9bc7.1694406359.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 In-Reply-To: <cover.1694406359.git.maxim.cournoyer@HIDDEN> References: <cover.1694406359.git.maxim.cournoyer@HIDDEN> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65860 Cc: Maxim Cournoyer <maxim.cournoyer@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Partially addresses <https://issues.guix.gnu.org/65716>. * gnu/packages/avr.scm: Add commentary comment. (avr-gcc): Turn into this... (make-avr-gcc): ... procedure. (avr-libc): Likewise, into... (make-avr-gcc): ... this. Adjust native-inputs accordingly. (avr-toolchain): Likewise, into... (make-avr-toolchain): ... this. * gnu/packages/avr-xyz.scm (simavr) [propagated-inputs]: replace avr-toolchain with a call to the 'make-avr-toolchain' procedure. --- gnu/packages/avr-xyz.scm | 2 +- gnu/packages/avr.scm | 66 +++++++++++++++++++++++++--------------- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/gnu/packages/avr-xyz.scm b/gnu/packages/avr-xyz.scm index a05157ede7..e8844b8d43 100644 --- a/gnu/packages/avr-xyz.scm +++ b/gnu/packages/avr-xyz.scm @@ -71,7 +71,7 @@ (define-public simavr (string-append "PREFIX=" #$output) (string-append "DESTDIR=" #$output)))) (propagated-inputs - (list avr-toolchain)) + (list (make-avr-toolchain))) (native-inputs (list autoconf which diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm index 9c623a9626..abca60eeac 100644 --- a/gnu/packages/avr.scm +++ b/gnu/packages/avr.scm @@ -38,15 +38,27 @@ (define-module (gnu packages avr) #:use-module (gnu packages flashing-tools) #:use-module (gnu packages gcc) #:use-module (gnu packages llvm) - #:use-module (gnu packages vim)) + #:use-module (gnu packages vim) + #:export (make-avr-toolchain)) -(define-public avr-binutils +;;; Commentary: +;;; +;;; This module defines a procedure that can be used to create a complete +;;; avr-toolchain package. The procedure must not be used at the top level, +;;; to avoid cyclic module dependencies caused by the (gnu packages +;;; cross-base) module referring to top level bindings from (gnu packages +;;; gcc). +;;; +;;; It also contains packages for working with or targeting the AVR system. +;;; + +(define (make-avr-binutils) (package (inherit (cross-binutils "avr")) (name "avr-binutils"))) -(define avr-gcc - (let ((xgcc (cross-gcc "avr" #:xbinutils avr-binutils))) +(define (make-avr-gcc) + (let ((xgcc (cross-gcc "avr" #:xbinutils (make-avr-binutils)))) (package (inherit xgcc) (name "avr-gcc") @@ -99,7 +111,7 @@ (define avr-gcc `(("gcc" ,gcc) ,@(package-native-inputs xgcc)))))) -(define avr-libc +(define (make-avr-libc) (package (name "avr-libc") (version "2.0.0") @@ -114,8 +126,8 @@ (define avr-libc (arguments '(#:out-of-source? #t #:configure-flags '("--host=avr"))) - (native-inputs `(("avr-binutils" ,avr-binutils) - ("avr-gcc" ,avr-gcc))) + (native-inputs `(("avr-binutils" ,(make-avr-binutils)) + ("avr-gcc" ,(make-avr-gcc)))) (home-page "https://www.nongnu.org/avr-libc/") (synopsis "The AVR C Library") (description @@ -124,27 +136,31 @@ (define avr-libc (license (license:non-copyleft "http://www.nongnu.org/avr-libc/LICENSE.txt")))) -(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. - (package - (name "avr-toolchain") - (version (package-version avr-gcc)) - (source #f) - (build-system trivial-build-system) - (arguments '(#:builder (begin (mkdir %output) #t))) - (propagated-inputs - `(("avrdude" ,avrdude) - ("binutils" ,avr-binutils) - ("gcc" ,avr-gcc) - ("libc" ,avr-libc))) - (synopsis "Complete GCC tool chain for AVR microcontroller development") - (description "This package provides a complete GCC tool chain for AVR +(define (make-avr-toolchain) + (let ((avr-binutils (make-avr-binutils)) + (avr-libc (make-avr-libc)) + (avr-gcc (make-avr-gcc))) + ;; 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. + (package + (name "avr-toolchain") + (version (package-version avr-gcc)) + (source #f) + (build-system trivial-build-system) + (arguments '(#:builder (begin (mkdir %output) #t))) + (propagated-inputs + `(("avrdude" ,avrdude) + ("binutils" ,avr-binutils) + ("gcc" ,avr-gcc) + ("libc" ,avr-libc))) + (synopsis "Complete GCC tool chain for AVR microcontroller development") + (description "This package provides a complete GCC tool chain for AVR microcontroller development. This includes the GCC AVR cross compiler and avrdude for firmware flashing. The supported programming languages are C and C++.") - (home-page (package-home-page avr-libc)) - (license (package-license avr-gcc)))) + (home-page (package-home-page avr-libc)) + (license (package-license avr-gcc))))) (define-public microscheme (package -- 2.41.0
guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.Received: (at submit) by debbugs.gnu.org; 11 Sep 2023 04:20:28 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 11 00:20:28 2023 Received: from localhost ([127.0.0.1]:51777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1qfYPT-0005OY-Om for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:20:28 -0400 Received: from lists.gnu.org ([2001:470:142::17]:48408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYPM-0005OF-GH for submit <at> debbugs.gnu.org; Mon, 11 Sep 2023 00:20:25 -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 <maxim.cournoyer@HIDDEN>) id 1qfYPA-0000d1-Mf for guix-patches@HIDDEN; Mon, 11 Sep 2023 00:20:08 -0400 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>) id 1qfYP8-0004g5-Ih for guix-patches@HIDDEN; Mon, 11 Sep 2023 00:20:08 -0400 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-64cca551ae2so26651646d6.0 for <guix-patches@HIDDEN>; Sun, 10 Sep 2023 21:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694406005; x=1695010805; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=oOHTltviIb/PgZ3xHh0o0UbtIwXnFa8gYgbv/Y29EB8=; b=cnfzHWXZiQEld98A6un2pkq+5GrHeMVp3MROxGIwmT6WrY5sMWdEnzcJVsnsEkvw9w 0B6WqvKMKdWGX0LJCLIqoLcOfPAFlkHTA8KJ2NI8j2Pzadf/QFWcD+8x8StAN0aoHuy+ 5yWCSQ25Ay0+rNq71e6tjhr9OKxbXvWPS8Jl/RnQFHsLAInpaBJEYR4ipbVKknywyrz1 B8NFdWjTjzdJ8VZLkCFzndJ7ugzK7PhOsDray90SwNmYbGgOz25o3fBPiPrTZ/EdrtLe ryuPPPbq2mWY5JEI3N8HkcEowXwUgmZVWs1SalyYPzvGSYYNo5XwisaiXGiDuEcUuYj6 7r3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694406005; x=1695010805; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oOHTltviIb/PgZ3xHh0o0UbtIwXnFa8gYgbv/Y29EB8=; b=LgXfnu8ww6hw5I0E3YnKfQBqn5dwgyI7B9pkAfI8bKNJmwfoS8o4m7QMLo5noRUQt/ U6xjen8sY2uYcC7kdqcoQhXo4YlflxzwNqDA3/3ESSrC1kc/CJpVMgDlP9xnU8gai4S8 n6iapuKUzp2fuoiXXyhmuZHnzuMGa7mr4zx9/opCR1JQseMYdfdZrfbCpvCjaZR1vopM a2uq+VpYHUUSBnXXPFP0h9UYd8O2toOMgARZ8Dw/EeYtEy3FIxkFoapn5zw0dhhS9PIh Yx7MSDZv1OMqaQZiy34VEdKohHcbFSuhbyyajkqh/+OfuugCb4BMKk0Q5n7wXE7ZHqOl cewg== X-Gm-Message-State: AOJu0YzWKJqpIFi1KpxkVZ+if3Vq6xOJ7BNaHgUsbZsrynuqDDoM8VLg 0I4tsf3uvM/D1SPrSdznof0zc4iba6c= X-Google-Smtp-Source: AGHT+IFZqIpkMzz+mAWhHvm8l6FZ78CaMReSI94mF4CTawJkIUIql5MS+PTiIpPs0Wn7H89TknBePg== X-Received: by 2002:a0c:b202:0:b0:63c:dde2:5a20 with SMTP id x2-20020a0cb202000000b0063cdde25a20mr7556218qvd.0.1694406005238; Sun, 10 Sep 2023 21:20:05 -0700 (PDT) Received: from localhost.localdomain (dsl-155-89.b2b2c.ca. [66.158.155.89]) by smtp.gmail.com with ESMTPSA id g20-20020a0caad4000000b0064f4186f6f0sm2672635qvb.93.2023.09.10.21.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Sep 2023 21:20:04 -0700 (PDT) From: Maxim Cournoyer <maxim.cournoyer@HIDDEN> To: guix-patches@HIDDEN, maxim.cournoyer@HIDDEN Subject: [PATCH 0/4] Resolve a circular module dependencies in embedded modules Date: Mon, 11 Sep 2023 00:19:50 -0400 Message-ID: <cover.1694405985.git.maxim.cournoyer@HIDDEN> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::f33; envelope-from=maxim.cournoyer@HIDDEN; helo=mail-qv1-xf33.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) This series is the culmination of at least a day of effort tracking down the source of a module dependency cycle (!). The last commit adds some guide lines in the hope to avoid a repeat (perhaps 'lint' could be taught to automate these checks). Maxim Cournoyer (4): gnu: avr: Delay all cross compilation packages. gnu: embedded: Turn packages using top-level variables into procedures. gnu: Remove extraneous imports. doc: Add new 'Circular Module Dependencies' section. doc/contributing.texi | 56 ++++++ gnu/packages/admin.scm | 5 - gnu/packages/avr-xyz.scm | 2 +- gnu/packages/avr.scm | 67 ++++--- gnu/packages/axoloti.scm | 6 +- gnu/packages/base.scm | 1 - gnu/packages/bootloaders.scm | 2 - gnu/packages/cran.scm | 2 - gnu/packages/embedded.scm | 322 +++++++++++++++++-------------- gnu/packages/emulators.scm | 3 - gnu/packages/firmware.scm | 4 - gnu/packages/kde.scm | 3 - gnu/packages/libcanberra.scm | 6 +- gnu/packages/libreoffice.scm | 4 - gnu/packages/linphone.scm | 4 - gnu/packages/mes.scm | 5 - gnu/packages/mingw.scm | 6 - gnu/packages/raspberry-pi.scm | 2 +- gnu/packages/serialization.scm | 5 +- gnu/packages/sync.scm | 2 - gnu/packages/syncthing.scm | 2 - gnu/packages/telephony.scm | 12 -- gnu/packages/terminals.scm | 1 - gnu/packages/version-control.scm | 2 - gnu/packages/video.scm | 7 - gnu/packages/wm.scm | 3 - 26 files changed, 286 insertions(+), 248 deletions(-) base-commit: 2eb6df537c36da8bf8e81ff698421f6fb1bfd1ab -- 2.41.0
Maxim Cournoyer <maxim.cournoyer@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#65860
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.