> > Anyone have a fix, workaround, or other suggestion? > > Yes don't use --with-dwarf2 :).
Only a short term workaround... ;) > This is PR 26504: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26504 Comment #8 there seems on-the-mark, so the PR 26015 fix has two half-confirmations now: > Also someone should try the patch in PR 26015: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26015: Which assumes the frame pointer is in a register (pair) on AVR ... seems normally true (r29:r28 == Y), but maybe someone more AVR-savvy should verify there are no nasty corner cases. > Which most likely will also fix this. Comment #8 said that the AVR version of that VAX patch helped -- and I got past that in the build, see my AVR SVN patch attached -- but there was a second issue with libssp that he worked around with "configure ... --disable-libssp". I took a quick look at the libssp thing, and it looks like maybe it's being built too early ... the linker needs some chip-specfic runtime (crts8515.o) that won't exist until AVR-libc gets built -- well after gcc gets built, that is. So, I have a successful build but haven't yet tried to flash and run the code yet. I'll let you know later if this compiler actually _works_ ... thanks! - Dave ---- "make" in object directory gave: Checking multilib configuration for libssp... mkdir -p -- avr/libssp Configuring in avr/libssp configure: creating cache ./config.cache checking build system type... i686-pc-linux-gnu checking host system type... avr-unknown-none checking target system type... avr-unknown-none checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for avr-strip... /usr/local/avr/avr/bin/strip checking for --enable-version-specific-runtime-libs... no checking whether to enable maintainer-specific portions of Makefiles... no checking for avr-gcc... /home/tux/avr/gcc/obj-avr/./gcc/xgcc -B/home/tux/avr/gcc/obj-avr/./gcc/ -B/usr/local/avr/avr/bin/ -B/usr/local/avr/avr/lib/ -isystem /usr/local/avr/avr/include -isystem /usr/local/avr/avr/sys-include checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. make[1]: *** [configure-target-libssp] Error 1 make[1]: Leaving directory `/home/tux/avr/gcc/obj-avr' make: *** [all] Error 2 Command exited with non-zero status 2 ---- avr/libssp/config.log held: configure:2307: checking for C compiler default output file name configure:2310: /home/tux/avr/gcc/obj-avr/./gcc/xgcc -B/home/tux/avr/gcc/obj-avr/./gcc/ -B/usr/local/avr/avr/bin/ -B/usr/local/avr/avr/lib/ -isystem /usr/local/avr/avr/include -isystem /usr/local/avr/avr/sys-include -O2 -g -O2 conftest.c >&5 /usr/local/avr/avr/bin/ld: crts8515.o: No such file: No such file or directory configure:2313: $? = 1 configure: failed program was: | /* elided, it's perfectly legit and not the problem */ configure:2352: error: C compiler cannot create executables
This gets GCC to build on AVR-8 "--with-dwarf2"; a "--disable-libssp" is necessary too, and should maybe be the default. --- gcc/config/avr/avr.h (revision 115307) +++ gcc/config/avr/avr.h (working copy) @@ -271,6 +271,8 @@ #define FIRST_PARM_OFFSET(FUNDECL) 0 +#define FRAME_POINTER_CFA_OFFSET(FUNDECL) 0 + #define STACK_BOUNDARY 8 #define STACK_POINTER_REGNUM 32