[crosstool-ng/crosstool-ng] 230dc1: avr: add support for AVR 8-bit architecture

Bryan Hundven bryanhundven@gmail.com
Mon Jul 20 22:22:00 GMT 2015


  Branch: refs/heads/master
  Home:   https://github.com/crosstool-ng/crosstool-ng
  Commit: 230dc12285842a51e0a2a95137ae4eae675b97d3
      https://github.com/crosstool-ng/crosstool-ng/commit/230dc12285842a51e0a2a95137ae4eae675b97d3
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    A config/arch/avr.in
    M config/kernel/linux.in
    M config/target.in
    A scripts/build/arch/avr.sh

  Log Message:
  -----------
  avr: add support for AVR 8-bit architecture

This commit adds support for the Atmel AVR 8-bit RISC architecture.
This is the first 8-bit architecture to be added to crosstool-ng so the
configuration options for 8-bit architectures are added here as well.

gcc has had support for AVR for quite a while, at least since the 4.3
series for the currently popular ATmega microcontroler series.
The AVR architecture only supports bare-metal toolchains.

gcc for the AVR 8-bit architecture, usually referred to as avr-gcc, is
commonly used in conjunction with the avr-libc library which provides
additional resources for the Atmel AVR 8-bit microcontrollers.

avr-gcc can also be found as a supported package in some recent Linux
distributions.

This commit also closes #66

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: b8e64a0c08ea2c3b2940d8e7154970f0dc610ed5
      https://github.com/crosstool-ng/crosstool-ng/commit/b8e64a0c08ea2c3b2940d8e7154970f0dc610ed5
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    A config/libc/avr-libc.in
    A config/libc/avr-libc.in.2
    M config/toolchain.in
    A scripts/build/libc/avr-libc.sh
    M scripts/build/libc/glibc.sh
    M scripts/build/libc/mingw.sh
    M scripts/build/libc/musl.sh
    M scripts/build/libc/newlib.sh
    M scripts/build/libc/none.sh
    M scripts/build/libc/uClibc.sh
    M scripts/functions
    M steps.mk

  Log Message:
  -----------
  avr-libc: add support for avr-libc C library

This commit adds support for the avr-libc C library.
According to the project page at http://www.nongnu.org/avr-libc , the
avr-libc package provides a subset of the standard C library for Atmel
AVR 8-bit RISC microcontrollers. In addition, the library provides the
basic startup code needed by most applications.

Support for this library in crosstool-ng is only enabled for the AVR
8-bit target.

The avr-libc manual and most distributions build the AVR 8-bit gcc
toolchain with the "avr" (non-canonical) target.
Some experimentation also led to the conclusion that other (canonical)
targets are not very well supported, so we force the "avr" target for
crosstool-ng as well.

The manual also recommends building avr-libc after the final gcc build.
To accomplish this with crosstool-ng, a new do_libc_post_cc step is
added, in which currently only avr-libc performs its build, and is a
no-op for the other libc options.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: 6da2fde11eca8be4a11cfea2e44a4b1f4902ff74
      https://github.com/crosstool-ng/crosstool-ng/commit/6da2fde11eca8be4a11cfea2e44a4b1f4902ff74
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    A samples/avr/crosstool.config
    A samples/avr/reported.by

  Log Message:
  -----------
  avr: add avr toolchain config sample

The avr-libc manual and most distributions build the AVR 8-bit gcc
toolchain with the "avr" (non-canonical) target.
Some experimentation also led to the conclusion that other (canonical)
targets are not very well supported, so we force the "avr" target for
crosstool-ng as well.

Some patches are required in avr-libc for a toolchain with gcc 5.x to
work. These patches are still not part of any avr-libc release version,
so the config sample currently forces 4.9.x to avoid requiring to clone
avr-libc trunk.

References:
    https://savannah.nongnu.org/bugs/?44574
    https://gcc.gnu.org/gcc-5/changes.html

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: 219c5e932fddfa9a5a996fb5774fdbe0e117c05c
      https://github.com/crosstool-ng/crosstool-ng/commit/219c5e932fddfa9a5a996fb5774fdbe0e117c05c
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    M scripts/functions

  Log Message:
  -----------
  functions: add support for arch-specific patch

Add support for applying arch-specific patches found in
"patches/${pkgname}/${version}/${CT_ARCH}".

This is needed for applying a popular binutils patch specific for the
AVR architecture but which isn't isolated for AVR in binutils' code.
In this case, applying it for every architecture would end up bloating
binutils' "size" options with AVR specifics.

This feels like a bit of a hack but it is easy enough to support with
current crosstool-ng infrastructure, seems like worth it for this case.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: 11646447fa2c43310f9edcd050d703debb11e6a2
      https://github.com/crosstool-ng/crosstool-ng/commit/11646447fa2c43310f9edcd050d703debb11e6a2
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    A patches/binutils/2.25/avr/0001-AVR-only-support-C-for-AVR-memory-usage.patch

  Log Message:
  -----------
  binutils: patch to support -C for AVR memory usage

Distribution avr toolchains commonly add a patch to binutils' size to
enable a custom "-C" option that shows AVR memory usage.
This patch is specific to the AVR architecture.
In order to make the crosstool-ng AVR toolchain compatible with existing
distribution toolchains, this patch is necessary.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: 14cc1cb28e37d5e6ce0b01990445de493ec7a967
      https://github.com/crosstool-ng/crosstool-ng/commit/14cc1cb28e37d5e6ce0b01990445de493ec7a967
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-21 (Sun, 21 Jun 2015)

  Changed paths:
    M scripts/functions

  Log Message:
  -----------
  functions: write permission in config.{guess,sub}

avr-libc doesn't have write permissions in these by default in the 1.8.1
tar release, this caused an error during build with
CT_OVERIDE_CONFIG_GUESS_SUB enabled.

chmod u+w them before overriding to avoid an this error.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: 2f436a02e35114487179f69fe24c62723724f8c4
      https://github.com/crosstool-ng/crosstool-ng/commit/2f436a02e35114487179f69fe24c62723724f8c4
  Author: Erico Nunes <nunes.erico@gmail.com>
  Date:   2015-06-27 (Sat, 27 Jun 2015)

  Changed paths:
    M samples/avr/crosstool.config

  Log Message:
  -----------
  avr: enable C++ support in the avr sample

C++ support is enabled in most samples existing in crosstool-ng and is also
supported by AVR.
As pointed out in pull request #124 in the crosstool-ng github, Arduino based
projects willing to use this toolchain will require C++ support.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>


  Commit: f9bb20c33009a972ac7a4f577c8c5d33c548b695
      https://github.com/crosstool-ng/crosstool-ng/commit/f9bb20c33009a972ac7a4f577c8c5d33c548b695
  Author: Bryan Hundven <bryanhundven@gmail.com>
  Date:   2015-07-20 (Mon, 20 Jul 2015)

  Changed paths:
    A config/arch/avr.in
    M config/kernel/linux.in
    A config/libc/avr-libc.in
    A config/libc/avr-libc.in.2
    M config/target.in
    M config/toolchain.in
    A patches/binutils/2.25/avr/0001-AVR-only-support-C-for-AVR-memory-usage.patch
    A samples/avr/crosstool.config
    A samples/avr/reported.by
    A scripts/build/arch/avr.sh
    A scripts/build/libc/avr-libc.sh
    M scripts/build/libc/glibc.sh
    M scripts/build/libc/mingw.sh
    M scripts/build/libc/musl.sh
    M scripts/build/libc/newlib.sh
    M scripts/build/libc/none.sh
    M scripts/build/libc/uClibc.sh
    M scripts/functions
    M steps.mk

  Log Message:
  -----------
  Merge pull request #124 from enunes/avr

avr: add support for AVR avr-libc toolchains


Compare: https://github.com/crosstool-ng/crosstool-ng/compare/9cf62f68ec8b...f9bb20c33009
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq


More information about the crossgcc mailing list