After installing version 5.4.0, I can no longer build any of the executables for various AVR targets, e.g.: avr-gcc -Os -g -std=gnu99 -Wall -Wextra -DF_CPU=1000000UL -DBAUD=9600UL -I. -mmcu=atmega328p -c -o main.o main.c avr-gcc -Wl,-Map,main.map -mmcu=atmega328p main.o -lm -o main.elf /usr/libexec/gcc/avr/ld: cannot find crtatmega328p.o: No such file or directory /usr/libexec/gcc/avr/ld: cannot find -latmega328p collect2: error: ld returned 1 exit status make: *** [Makefile:119: main.elf] Error 1 Configuration: avr-gcc -v Using built-in specs. Reading specs from /usr/lib/gcc/avr/5.4.0/device-specs/specs-avr2 COLLECT_GCC=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/5.4.0/avr-gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/avr/5.4.0/lto-wrapper Target: avr Configured with: /var/tmp/portage/cross-avr/gcc-5.4.0-r3/work/gcc-5.4.0/configure --host=x86_64-pc-linux-gnu --target=avr --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/avr/5.4.0/include --datadir=/usr/share/gcc-data/avr/5.4.0 --mandir=/usr/share/gcc-data/avr/5.4.0/man --infodir=/usr/share/gcc-data/avr/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/avr/5.4.0/include/g++-v5 --with-python-dir=/share/gcc-data/avr/5.4.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 5.4.0-r3 p1.3, pie-0.6.5' --enable-libstdcxx-time --enable-poison-system-directories --enable-shared --disable-threads --disable-bootstrap --enable-multilib --disable-altivec --disable-fixed-point --disable-libgcj --disable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts --disable-libmpx --disable-vtable-verify --disable-libvtv --disable-libquadmath --enable-lto --without-isl --disable-libsanitizer Thread model: single gcc version 5.4.0 (Gentoo 5.4.0-r3 p1.3, pie-0.6.5)
I just found the same issue. Turns out that the stable version of avr-libc (1.8.0) is not compatible with gcc-5.4.0. See https://forums.gentoo.org/viewtopic-t-1039606-start-0.html Upgrading to avr-libc-2.0.0 fixes it for me.
dev-embedded/avr-libc-2.0.0 is marked stable. That should help at least a bit. Thanks for the report!
*** Bug 628152 has been marked as a duplicate of this bug. ***