From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +IruKaTNVmH0/wAAgWs5BA (envelope-from ) for ; Fri, 01 Oct 2021 10:58:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wI58JaTNVmE4XwAAbx9fmQ (envelope-from ) for ; Fri, 01 Oct 2021 08:58:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2DD4D14C52 for ; Fri, 1 Oct 2021 10:58:12 +0200 (CEST) Received: from localhost ([::1]:48332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWEMt-0005jg-86 for larch@yhetil.org; Fri, 01 Oct 2021 04:58:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWEMk-0005h8-0M for guix-patches@gnu.org; Fri, 01 Oct 2021 04:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWEMj-0001j1-Os for guix-patches@gnu.org; Fri, 01 Oct 2021 04:58:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWEMj-00072p-Np for guix-patches@gnu.org; Fri, 01 Oct 2021 04:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48767] [PATCH] gnu: gcc-arm-none-eabi-7-2018-q2-update: Simplify build Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Oct 2021 08:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48767 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Morgan.J.Smith@outlook.com, 48767@debbugs.gnu.org Received: via spool by 48767-submit@debbugs.gnu.org id=B48767.163307863127021 (code B ref 48767); Fri, 01 Oct 2021 08:58:01 +0000 Received: (at 48767) by debbugs.gnu.org; 1 Oct 2021 08:57:11 +0000 Received: from localhost ([127.0.0.1]:54654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWELv-00071j-9G for submit@debbugs.gnu.org; Fri, 01 Oct 2021 04:57:11 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWELr-00071X-M5 for 48767@debbugs.gnu.org; Fri, 01 Oct 2021 04:57:09 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id 0Yx5260080mfAB401Yx5Lx; Fri, 01 Oct 2021 10:57:05 +0200 Message-ID: From: Maxime Devos Date: Fri, 01 Oct 2021 10:56:57 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-IZZqXp/1TuRjHgPnbx62" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1633078626; bh=2DqXktWU+r8IhdO6gBG5O+N26wfx019wkne1iJHrnnw=; h=Subject:From:To:Date:In-Reply-To:References; b=MAEBCRieCaMHb6oecKWXL5YZB3zgRJgC0B7fVWzUnE/xTPbpRZNha7xo0P1Hi5JlI +CjZwG2nQjPouLM9tTLZ+6XBMrFPa14FmzbqSCPSmRPRqXTK6Wzl7wjHHzbsV8Xk9K 6IGdRD/nhxbe8hEp+smIaTMsjBPMvbfBDgaY93FFGJ1/JpH9AwMQy4/kWfCzByd4F8 5e54mOyFU9eTuDA4Nq5vbgDx6Ihho8BWw3PUyJTPuFG7yBmh24m7Xvp6o+ZYdWXLvY pDVf4/IEDZwlQqP12P+ySXp7P95bqGBWK1WwCPN1v+pj28eGVr72KKVH1dTAtfYM16 aHjCHZXowBaNA== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633078692; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=2DqXktWU+r8IhdO6gBG5O+N26wfx019wkne1iJHrnnw=; b=IB6LNkcgl1t8WQPDE6xoRIviFKX4sPEEOG7BJxmUZZjO4CajZ7IIfc5/R3ir4jqmnDg99m HHTeG1itt74TiDdTfeOs3b5mrR3698EwjtP5SSKZW/znrPN1pQOld38BApbGREUhHFIcpV U/E75CZ6/8FWiOuBqb7ATjM3UlYG1feF0R23lFayVd8oXFJtKL+M8PiZ+l23bDPdMXrEYu Uqa6InA27kkSDr2nUsk65qzGSwOCfIZfB5Dmy1HvJnUg3/8JS02+WvIfYdc/VA4DHsnAm6 t07vUYuguZv8Shy85l7BZyx32hFn2uBbOvIGnOJbUe/+vSxPq9NQwP+Xow/vsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633078692; a=rsa-sha256; cv=none; b=p9e/oZ6Grc1SNB3QaZOWSwHntEOMj+eyU789GGazcG5JTvlG/8DOQFa1GP+8EayrC22Oxn vN5V0r35jRpnX6ys37i30MT1U/xUvbVjmAy/QNzeww+FGrSiQST7a2V0Ged61oAhK+ZreD JBoQhSHp+t9qGqeDFDXvAVrUft96gjLjRFj+i4IN8W+3/2611Oaj3KwcxA98bHPffqThwi AY2bfR5oBhzLsZgYOue+WPti4cNHARZins8loRpjlcJgYffGvyIv79JNVaWZr9J6+BB100 oL8w93+6GlJpcSQjEqvCoKeGtnOklnIk3Grr9msghUCLiuD6bUd2EvLWCDBL8A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=MAEBCRie; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=MAEBCRie; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2DD4D14C52 X-Spam-Score: -1.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: PK37rscHixQ8 --=-IZZqXp/1TuRjHgPnbx62 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Morgan.J.Smith@outlook.com schreef op ma 27-09-2021 om 17:59 [-0400]: > From: Morgan Smith >=20 > * gnu/packages/embedded.scm > (gcc-arm-none-eabi-4.9)[phases]: Add expand-version-string phase >=20 > (gcc-arm-none-eabi-7-2018-q2-update): Inherit from gcc-arm-none-eabi-4.9 = and > remove all the redundant bits. > --- I see you moved the definition of gcc-arm-none-eabi-7-2018-q2-update. This= patch would be easier to review if it wasn't moved, as the diff would then be sma= ller. >=20 > Hello Maxime, >=20 > Thanks for the review! >=20 > Is this the appropriate time to tell you I also have a very eerily simila= r > patch set read to go for a riscv cross compiler? Maybe trying to make thi= s > stuff reusable is a good thing to do. First step is to clean up the arm s= tuff I > suppose. I'm not really familiar with cross-compilation as done in (gnu packages emb= edded); I'm more familiar with cross-compilation with "guix build PACKAGE --target= =3Driscv64-...". If you're doing the latter, you'll need to look at glibc-dynamic-linker in (gnu packages bootstrap) and (gnu packages cross-base). > I pretty sure this patch doesn't really change the packages at all in any > meaningful way. Adding the DEV-PHASE version thing means that now when pe= ople > type 'arm-none-eabi-gcc --version' they'll see in brackets the guix versi= on > number beside the actual version number. > Also gcc-arm-none-eabi-7-2018-q2-update now has the 'with-multilib-list' = configure > flag set twice but it's pretty clear it just uses the latter value as it = won't > even compile with the inherited flag value. >=20 > There seems to be a weird glitch when you inherit a phase the uses > `this-package' but you also specify arguments. I found a work around thou= gh. Alternatively, you could use (receive (name version) (package-name->name+version (strip-store-file-name (assoc-ref outputs "= out"))) (write version to gcc/DEV-PHASE)) in the 'expand-version-string build phase of gcc-arm-none-eabi-4.9. Or set the version in a snippet of the 'origin' records (gcc/DEV-PHASE is s= ource code, right?). Possibly using (display ,version) instead of (display ,(package-version this-package)) avoids the issue (not 100% sure t= hough). [...] > +;;; 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 ((revision "2") > + (svn-revision 261907)) > + (package (inherit gcc-arm-none-eabi-6) > + (version (string-append "7-2018-q2-update-" The version strings of GCC are things like "11.2.0" or "6.5.0", not strings like "7.5.0". As this is a SVN snapshot, and appears to be based on the 7.?.? series, maybe something like "7.MINOR.PATCH-REVISION-SVN= REVISION" would be appropriate? I'm wondering why a SVN revision revision is used, as presumably the embedd= ed-7-branch has been merged and would be available from an appropriately-configured gcc= @8.6.0, gcc@9.4.0, or gcc@10.3.0? A comment next to gcc-arm-none-eabi-4.9 says ;; We must not use the released GCC sources here, because the cross-compile= r ;; 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 but maybe these bugs have been solved by now, or is using the branch still = required? > + revision "." (number->string svn-revision)= )) > + (source > + (origin > + (method svn-fetch) > + (uri (svn-reference > + (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-b= ranch/") > + (revision svn-revision))) > + (file-name (string-append "gcc-arm-embedded-" version "-checkou= t")) > + (sha256 > + (base32 > + "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5")) > + (patches > + (append > + (origin-patches (package-source gcc-7)) > + (search-patches "gcc-7-cross-environment-variables.patch"))))= ) > + (arguments > + (substitute-keyword-arguments (package-arguments gcc-arm-none-eab= i-4.9) > + ((#:configure-flags flags) > + ;; I add this flag on the end so it overrides the previously s= et value > + `(append ,flags (list "--with-multilib-list=3Drmprofile"))) > + ((#:phases phases) > + `(modify-phases ,phases > + ;; XXX: I replicated this phase just so that the version is > + ;; correct. This phase automatically gets the correct vers= ion if > + ;; I don't specify any arguments for a package for some rea= son > + ;; (see gcc-arm-none-eabi-6) > + (replace 'expand-version-string > + (lambda _ > + (make-file-writable "gcc/DEV-PHASE") > + (with-output-to-file "gcc/DEV-PHASE" > + (lambda () > + (display ,(package-version this-package))))))))))))= ) > + Greetings, Maxime. --=-IZZqXp/1TuRjHgPnbx62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVbNWRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sFWAQCkjAw2Wv4eDlwrYLcgy3goGjpR XlV4ruhnXuxnNdVA3QD/eCUvn/SCWzFp6cmfpS3/lYp0q1v5EXekzy/2+Nx+0ws= =qr8S -----END PGP SIGNATURE----- --=-IZZqXp/1TuRjHgPnbx62--