161.17. gcc-avr-16.2.0
GCC for AVR microcontrollers (ATmega and ATtiny)
16.2.0-1 · GPL-3.0-or-later AND GPL-3.0-or-later WITH GCC-exception-3.1 · 48.3 SBU · 474.7 MiB, 1189 files · 41_system, 475 of 1047 · ports/core/embedded/gcc-avr
Homepage: https://gcc.gnu.org/
Why it is in KDOS. The comment above the 3 ports from binutils-avr to avr-libc in script/phases/41_system/packages.d/embedded.txt:
The spare-parts drawer. avr-libc rather than picolibc: AVR is a Harvard machine with its own address spaces and picolibc does not target it.
Depends on: binutils-avr, gmp, mpfr, mpc, zlib, zstd, texinfo.
Required by (1): avr-libc.
Sources: gcc-avr-16.2.0.tar.xz (102.2 MiB). Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install gcc-avr'
build.sh:
mkdir -p build && cd build
../configure \
--target=avr \
--prefix=/usr \
--libexecdir=/usr/lib \
--with-sysroot=/usr/avr \
--enable-languages=c,c++ \
--without-headers \
--with-newlib \
--disable-nls \
--disable-shared \
--disable-threads \
--disable-libssp \
--disable-libgomp \
--disable-libquadmath \
--disable-libatomic \
--disable-libstdcxx-pch \
--disable-decimal-float \
--with-gnu-as --with-gnu-ld \
--with-zstd=/usr \
--without-isl \
--enable-multilib \
--enable-host-pie \
--enable-host-bind-now \
--with-pkgversion="KDOS" \
CFLAGS_FOR_TARGET="-Os -pipe -ffunction-sections -fdata-sections"
make all-gcc all-target-libgcc LIBGCC2_DEBUG_CFLAGS=-g0
make DESTDIR=$PKG install-gcc install-target-libgcc LIBGCC2_DEBUG_CFLAGS=-g0
rm -rf "$PKG/usr/share/info" "$PKG/usr/share/man/man7"
Programs: avr-c++, avr-cpp, avr-g++, avr-gcc, avr-gcc-16.2.0, avr-gcc-ar, avr-gcc-nm, avr-gcc-ranlib, avr-gcov, avr-gcov-dump, avr-gcov-tool, avr-lto-dump.
Directories: /usr/lib/gcc/avr, /usr/share/licenses/gcc-avr.