Created attachment 509512 [details] gcc-build-logs.tar.bz2 I think I ran into this problem once before with an earlier version and found a workaround or configuration change that would enable it to build, but I'll be damned if I can figure it out again. I've tried disabling parallel builds and ccache. I have "cross-avr/gcc -pie -vtv -sanitize" in package.use. I've tried disabling most CFLAGS (cutting back to just "-O2 -pipe". In every case, the result is the same: multiple megabytes spammed to the terminal, ending with an error message.
Created attachment 509516 [details] emerge --info
Created attachment 509518 [details] emerge -pqv
I don't know if I was trying to build things the wrong way (emerge cross-avr/gcc instead of letting crossdev handle the process), but I eventually got the build to complete: 1) crossdev -S -oO /usr/local/overlays/crossdev -t avr I don't want crossdev stomping on other overlays, so I tell it to use /usr/local/overlays/crossdev. The first time out, this fails because the ebuild digests need to be updated. Also, see https://forums.gentoo.org/viewtopic-t-1068798-highlight-.html ...add -pie to USE in /usr/avr/etc/portage/make.conf. 2) for i in binutils gcc avr-libc; do (cd /usr/local/overlays/crossdev/cross-avr/$i && for j in *.ebuild; do ebuild $j digest; done); done 3) crossdev -S -oO /usr/local/overlays/crossdev -t avr This time, it'll build binutils, then gcc stage 1, then avr-libc. 4) Test with something, like the Blinky example for Teensy (https://www.pjrc.com/teensy/gcc.html). See that make runs without errors and produces a working executable you can put on a device.
Your initial build failure was in libgomp (and libbacktrace): configure: error: in `/var/tmp/portage/cross-avr/gcc-6.4.0/work/build/avr/libgomp': configure: error: C compiler cannot create executables configure:3735: /var/tmp/portage/cross-avr/gcc-6.4.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-avr/gcc-6.4.0/work/build/./gcc/ -B/usr/avr/bin/ -B/usr/avr/lib/ -isystem /usr/avr/include - isystem /usr/avr/sys-include -g -O2 conftest.c >&5 /usr/libexec/gcc/avr/ld: cannot find -lm /usr/libexec/gcc/avr/ld: cannot find -lc I think it was fixed in crossdev recently by forcing gcc to stage1 only (STAGE_DEFAULT=${STAGE_LIBC}): https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=8f04ee910e38c38f597ebebc35190140e6ffa310 The change was included in sys-devel/crossdev-20171119 Sounds plausible that you used newer crossdev this time? 'emerge -1 cross-avr/gcc' should also work.
(In reply to Sergei Trofimovich from comment #4) > Your initial build failure was in libgomp (and libbacktrace): > > I think it was fixed in crossdev recently by forcing gcc to stage1 only > (STAGE_DEFAULT=${STAGE_LIBC}): > > https://gitweb.gentoo.org/proj/crossdev.git/commit/ > ?id=8f04ee910e38c38f597ebebc35190140e6ffa310 > > The change was included in sys-devel/crossdev-20171119 > > Sounds plausible that you used newer crossdev this time? The previous build was with that version of crossdev (checked my logs). Last time I needed to build it (which wasn't that long ago), I think I had run into issues with earlier versions of crossdev and updated to the latest and greatest.