Okay here is my struggle with avr-gcc on gentoo. After reading several bugreports you should do: Edit /usr/sbin/crossdev and change line 334 to WITH_DEF_HEADERS="no" Select version of binutils and gcc (as default ones doesn't compile) for example crossdev -t avr --b 2.18.50.0.9 --g 4.1.2 Create symlink for linker scripts on x86_64 use ln -s /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts/ /usr/libexec/gcc/avr/ldscripts read more