GNU bug report logs - #66263
[PATCH 00/23] guix: Add avr as a platform.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>

Date: Fri, 29 Sep 2023 09:15:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
Subject: bug#66263: closed (Re: [bug#66263] Updated patch series.)
Date: Mon, 11 Dec 2023 11:59:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#66263: [PATCH 00/23] guix: Add avr as a platform.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 66263 <at> debbugs.gnu.org.

-- 
66263: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66263
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Efraim Flashner <efraim <at> flashner.co.il>
To: Jean-Pierre De Jesus Diaz <jean <at> foundationdevices.com>
Cc: 66263-done <at> debbugs.gnu.org
Subject: Re: [bug#66263] Updated patch series.
Date: Mon, 11 Dec 2023 13:58:02 +0200
[Message part 3 (text/plain, inline)]
On Tue, Nov 28, 2023 at 11:50:50AM +0000, Jean-Pierre De Jesus Diaz via Guix-patches via wrote:
> Hello,
> 
> I've sent an updated revision of the changes, now adding
> the MinGW toolchain targets and also changing the Ergodox
> and QMK firmwares to use #:target "avr" for cross-compilation,
> so it removes make-avr-toolchain from `qmk` inputs as packages
> should use #:target "avr" or in user profiles cases they can install
> the toolchain from the packages in cross-toolchain.scm.
> 
> The QMK package warns about the firmware not compiling with
> GCC 8+ but it seems to be working right now with the default
> GCC used in Guix, so maybe it'd be to tie the package to the
> default GCC version as IIRC there's no way to pass a custom base
> GCC version when using #:target means of cross compilation.
> 
> I've also moved the toolchain procedure to cross-base.scm and
> memoized it.

Wow! Thank you for all the work on this.

Patches slightly modified (indentation, wording on commit messages) and
pushed!

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
To: guix-patches <at> gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundationdevices.com>
Subject: [PATCH 00/23] guix: Add avr as a platform.
Date: Fri, 29 Sep 2023 11:13:33 +0200
Hello Guixers,

This adds avr as a platform to GNU Guix allowing to cross-compile
packages to it.

For the impatient, with this patch series one can build the provided
unity package with this invocation:

./pre-inst-env guix build unity --target=avr

It uses the AVR Libc as the default libc and fully builds a
cross-compiler using the AVR Libc instead of building them separately
like it's done currently.  This could allow to use other of front-ends of
GCC in the future if possible, however, Fortran and Objective-C
front-ends don't build right now for AVR, haven't tested any other
front-ends.

This also adds the cross-toolchain module for instantiating
cross-toolchain packages, this is to avoid each platform defining a
module like avr to instantiate a toolchain, this helps in avoiding
circular dependencies as cross-toolchain should depend only on
cross-base and that'd be it.

I think could've added cross-toolchains there for MinGW though, but I
don't have a need for it but allows others to do so.  Perhaps it could
be a requirement that to add a platform one needs to add a
cross-toolchain package.

I enabled multilib support for AVR as most embedded platforms will need
it, which makes me think, perhaps should the platform record contain a
`mutlilib?' field?

Information about individual patches:

On [PATCH 05/23] I didn't find a better way of deleting the
--disable-multilib flag from GCC configure flags, if anyone has a better
idea let me know.

The [PATCH 01/23] and [PATCH 02/23] are optional but there
might be some platforms defined in the future that don't have
a proper libc and it still should be fine to use these I think.

The [PATCH 21/23] fixes a bug in the meson-configuration module
and can be applied independently.

Feel free to cherry pick the interesting/trivial patches.

PS:

I CC'ed the embedded team and Maxim Cournoyer as I saw his current work
on QMK firmwares and could be of interest to him.

Jean-Pierre De Jesus DIAZ (23):
  gnu: cross-libc: Return #f if no libc available.
  guix: gnu: Handle platforms without libc.
  gnu: Add avr platform.
  guix: utils: Add target-avr?.
  gnu: cross-gcc: Enable multilib for avr.
  gnu: microscheme: Move to avr-xyz.
  gnu: Add AVR phases to cross-gcc-build-phases.
  gnu: avr-libc: Convert to procedure.
  gnu: Add make-cross-gcc-toolchain.
  gnu: Add binutils-cross-avr.
  gnu: avr-binutils: Deprecate package.
  gnu: Remove various AVR packages.
  gnu: cross-libc: Add AVR Libc case.
  gnu: cross-gcc-arguments: Handle AVR target.
  guix: meson-configuration: Fix boolean assigment.
  gnu: cross-gcc-search-paths: Handle AVR target.
  gnu: cross-gcc: Handle inputs for AVR.
  gnu: Add avr-libc.
  gnu: Add gcc-cross-avr-toolchain.
  gnu: Add avr-toolchain.
  guix: meson-build-system: Support AVR.
  guix: meson-build-system: Disable PIC for AVR.
  gnu: Add unity.

 Makefile.am                        |   1 +
 doc/guix.texi                      |   6 +
 gnu/build/cross-toolchain.scm      |  41 +++++-
 gnu/local.mk                       |   1 +
 gnu/packages/avr-xyz.scm           |  41 ++++++
 gnu/packages/avr.scm               | 152 +++-----------------
 gnu/packages/check.scm             |  41 ++++++
 gnu/packages/cross-base.scm        | 213 +++++++++++++++++++----------
 gnu/packages/cross-toolchain.scm   |  88 ++++++++++++
 guix/build-system/gnu.scm          |  12 +-
 guix/build-system/meson.scm        |  14 +-
 guix/build/meson-configuration.scm |   4 +-
 guix/platforms/avr.scm             |  29 ++++
 guix/utils.scm                     |   4 +
 14 files changed, 421 insertions(+), 226 deletions(-)
 create mode 100644 gnu/packages/cross-toolchain.scm
 create mode 100644 guix/platforms/avr.scm

-- 
2.34.1




This bug report was last modified 1 year and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.