Description of problem: avr-libc combined with avr-gcc cannot link for some mcu's. If you combine it with older versions (avr-gcc-4.6.3-1.fc17) it does work. I believe this is something to do with recent avr-gcc changes that avr-libc hasn't kept pace with. The avr-gcc/libc release from Atmel doesn't have the same problem and they have published their source patches at: http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/ Perhaps including some/all of their patches should be considered? Version-Release number of selected component (if applicable): avr-libc-1.8.0-2.fc18.noarch How reproducible: Every time. Steps to Reproduce: 1. Compile with -mmcu=attiny2313a. Other targets may also be a problem, but I don't know which. 2. 3. Actual results: avr-gcc -Wall -fshort-enums -fpack-struct -fwhole-program -ffreestanding -funsigned-char -Os -mmcu=attiny2313a ibus.c -o ibus.o -Wa,-ahls=ibus.lst /usr/lib/gcc/avr/4.7.2/../../../../avr/bin/ld: cannot find crttn2313a.o: No such file or directory collect2: error: ld returned 1 exit status Expected results: A successful link. Additional info: * avr-gcc-4.6.3-1.fc17 doesn't exhibit this problem. * avr8-gnu-toolchain-3.4.2.939-linux.any.x86_64.tar.gz from Atmel doesn't exhibit this problem.
avr-gcc is trying to access crttn2313a.o from the "tiny-stack" subdirectory, which doesn't exist, but should. In comparison, Atmel's release contains these files: avr8-gnu-toolchain-linux_x86_64/avr/lib/avr25/tiny-stack/crttn2313a.o avr8-gnu-toolchain-linux_x86_64/avr/lib/avr25/crttn2313a.o strace: ~~~~~~~ access("/usr/lib/gcc/avr/4.7.2/avr25/tiny-stack/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/gcc/avr/4.7.2/../../../../avr/lib/avr/4.7.2/avr25/tiny-stack/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/gcc/avr/4.7.2/../../../../avr/lib/avr25/tiny-stack/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/gcc/avr/4.7.2/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/gcc/avr/4.7.2/../../../../avr/lib/avr/4.7.2/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) access("/usr/lib/gcc/avr/4.7.2/../../../../avr/lib/crttn2313a.o", R_OK) = -1 ENOENT (No such file or directory) wait4(1812, /usr/lib/gcc/avr/4.7.2/../../../../avr/bin/ld: cannot find crttn2313a.o: No such file or directory
reproducible unfortunately this is not easy to solve. atmel uses older releases and has patches for those older releases we use newer releases, because they contain more fixes and the resulting code is significantly smaller new compiler does not tolerate some misuse present in old avr-libc, so we need new avr-libc too avr-libc does not have support for all microcontrollers, because atmel does not try to upstream necessary patches and for undermanned avr-libc upstream it's slow work Right now, what we have is avr-libc with a big patch from atmel. But that patch needs to be forwardported because some code in avr-libc is newer and changes in atmel patch are incompatible. With this patch, attiny2313a is one of the microcontrollers that does not work. I checked repository snapshot of avr-libc and there attine2313a works, but our patch is no longer applicable so a lot of MCUs from atxmega familly no longer works. I'll have to port atmel's patch to latest avr-libc code, but it will take some time.
Are you sure Atmel uses older releases? As far as I can see, it's avr-libc-1.8.0 in both Fedora and Atmel's build and avr-gcc is also 4.7.2 in both. The tiny-stack changes occurred in avr-libc SVN a long time ago, but it seems they haven't done a regular tarball release for a LONG time: http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2291
(In reply to Peter Zelezny from comment #3) > The tiny-stack changes occurred in avr-libc SVN a long time ago, but it > seems they haven't done a regular tarball release for a LONG time: I know, read my comment #2 again. I tested new versions: > I checked repository snapshot of avr-libc and there attine2313a works, but our > patch is no longer applicable so a lot of MCUs from atxmega familly no longer > works.
avr-libc-1.8.0-3.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/avr-libc-1.8.0-3.fc18
avr-libc-1.8.0-5.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/avr-libc-1.8.0-5.fc19
Package avr-libc-1.8.0-5.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing avr-libc-1.8.0-5.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-11722/avr-libc-1.8.0-5.fc19 then log in and leave karma (feedback).
avr-libc-1.8.0-5.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
avr-libc-1.8.0-3.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
avr-libc-1.8.0-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-7c5e2b33d0
avr-libc-1.8.0-5.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.