Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 246836 - avr-gcc and avr-libc are not compatible with avr-binutils
Summary: avr-gcc and avr-libc are not compatible with avr-binutils
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-15 10:50 UTC by Nicholas Vinen
Modified: 2008-11-21 06:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix this bug in binutils-2.19 (40-binutils-2.19-wrong-arch.patch,576 bytes, patch)
2008-11-21 06:04 UTC, Nicholas Vinen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Vinen 2008-11-15 10:50:49 UTC
I've had to upgrade to the latest versions of avr-libc, avr-binutils and avr-gcc because older versions don't properly support the AT90USB162. However the latest versions don't properly support it either. I am using:

avr-gcc 4.3.2
avr-binutils 2.19
avr-libc 1.6.2

The error is:

$ avr-gcc -Os -Wall -mmcu=at90usb162 -o test.o test.c
/usr/libexec/gcc/avr/ld: avr:4 architecture of input file `/usr/lib/gcc/avr/4.3.2/../../../../avr/lib/avr35/crtusb162.o' is incompatible with avr:3 output
/usr/libexec/gcc/avr/ld: avr:4 architecture of input file `/tmp/cc4DQkkx.o' is incompatible with avr:3 output

Now, the thing is, AT90USB162 is avr3.5 architecture, which is inbetween 3 and 4. It seems to me somebody has hacked avr3.5 architecture in by pretending it's avr3 in one place and avr4 in another place and so the whole thing falls apart.


Reproducible: Always

Steps to Reproduce:
1. Install latest versions of avr-gcc, avr-binutils and avr-libc
2. echo 'int main(void) { return 0; }' > test.c
3. avr-gcc -Os -Wall -mmcu=at90usb162 -o test.o test.c

Actual Results:  
Error pasted above.

Expected Results:  
Should compile and link properly.

I am happy to use an older version of these tools if someone can point me to a set which will produce working output to load onto an at90usb162 chip. Earlier versions fail in different ways.
Comment 1 SpanKY gentoo-dev 2008-11-17 18:27:43 UTC
if the main versions dont support the processor, then there's nothing we can do about it.  we arent AVR developers.  you'll have to consult the AVR forums (wherever those may be) to find out more information.
Comment 2 Nicholas Vinen 2008-11-21 06:04:54 UTC
Created attachment 172624 [details, diff]
Patch to fix this bug in binutils-2.19

I brought this up on the avr-gcc mailing list and I was given this patch. It fixes the problem. The author says he has submitted it to binutils but since they haven't released a new version in over six months, we are stuck with the buggy version being the latest release. If you could add this to the set of Gentoo patches that could be really handy.


Thanks,
Nicholas