Summary: | cross-avr/gcc-4.3.1-r1 'crossdev -t avr' fails with 'illegal opcode movw for mcu avr3' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Lord Realname <bugs.gentoo> |
Component: | [OLD] Development | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | bugs+gentoo, david+gentoo.org, dev-embedded+disabled, haavardw, jer, lz1bgb, orzel, radek, sandro.bonazzola, seventhguardian |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | buildlog |
Description
Lord Realname
2008-07-07 20:04:49 UTC
Created attachment 159818 [details]
buildlog
Oh, missed something: Steps to Reproduce: 'crossdev -t avr' after setting WITH_DEF_HEADERS="no" in /usr/sbin/crossdev line 334, because WITH_DEF_HEADERS="yes" failed. See http://bugs.gentoo.org/show_bug.cgi?id=230343 I get the exact same problem, I believe it is a mismatch between gcc and binutils. gcc-4.3.0+ needs binutils 2.18.50 or higher. testing it now (In reply to comment #3) > I get the exact same problem, I believe it is a mismatch between gcc and > binutils. gcc-4.3.0+ needs binutils 2.18.50 or higher. testing it now I got the same with gcc 4.1.2 and binutils 2.17-r1. Trying to update. I was able to work around this by first pulling in the overlay with crossdev -t avr After crashing I removed the avr-dev related entries from the /etc/portage/package.keywords and emerged cross-avr/binutils, cross-avr/gcc, cross-avr/avr-libc, cross-avr/gdb and cross-avr/insight manually. @hlg, what gcc version did you build? This seems to work for me: crossdev --b 2.18.50.0.9 --g 4.3.1-r1 --target avr I also came from Bug #230343 and comment #5 mostly worked for me, but I had to emerge cross-avr/gcc manually before emerging the others. This provided avr-gcc which crossdev was complaining about, so I could then re-run crossdev -t avr. But I also masked >=cross-dev/gcc-4.0.0 because I need a 3.x version for a particular PLC and software. The issue here is that though crossdev should emerge the most recent binutils (2.18.50.* at the time of writing), it instead merges an older one that is not compatible with the new gcc version. If the newer binutils is specified manualy on the crossdev line, then gcc compiles correctly. ex: #crossdev -t avr --b 2.18.50.0.9 #7, #9, nope. may work for you, but not others. 4.x gcc does not do avr yet. 3.4.6-r2 will. /../gcc/config/avr/libgcc.S: Assembler messages: /../gcc/config/avr/libgcc.S:281: Error: illegal opcode movw for mcu avr3 /../gcc/config/avr/libgcc.S:283: Error: illegal opcode movw for mcu avr3 (In reply to comment #10) > #7, #9, nope. may work for you, but not others. 4.x gcc does not do avr yet. > 3.4.6-r2 will. #crossdev -t avr --b 2.18.50.0.9 works for me (as gcc 3.4.6 and gcc 4.1.2 did) It seems to be fixed Scott ~ # crossdev -t avr * binutils: binutils-[latest] * gcc: gcc-[latest] * libc: avr-libc-[latest] /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.2/work/gcc-4.3.2/libgcc/../gcc/config/avr/libgcc.S: Assembler messages: /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.2/work/gcc-4.3.2/libgcc/../gcc/config/avr/libgcc.S:281: Error: illegal opcode movw for mcu avr3 /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.2/work/gcc-4.3.2/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode movw for mcu avr3 Scott ~ # crossdev --g 4.3.1-r1 -t avr * binutils: binutils-[latest] * gcc: gcc-4.3.1-r1 * libc: avr-libc-[latest] /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S: Assembler messages: /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:281: Error: illegal opcode movw for mcu avr3 /usr/vport/cross/avr/portage/cross-avr/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../gcc/config/avr/libgcc.S:283: Error: illegal opcode movw for mcu avr3 seems not to be, with or without --b 2.18.50.0.9 This is bug in crossdev script. This script is not working correctly for AVR port of GCC. I subscribe how-to install avr toolchain in avr-devel mail list. http://lists.gnu.org/archive/html/avr-libc-dev/2008-12/msg00010.html I'm not expert in bash programming but the problem in script will be solved if: 1. Script can check dependency of avr-lib, binutils and gcc for competability of version. 2. Perform correct sequence of installing binutils, gcc, avr-libc - curently sequence is binutils, avr-libc (on this stage is fail), gcc. I can't force instalation of stage 1 (gcc only). crossdev follows whatever is default stable/unstable for your host arch. there is no version checking to make sure things work. if you need specific versions, then specify them with --bver/--gver/--lver. i'm not adding logic to crossdev to check for working combinations. #15 i understand. Though when i start 'crossdev avr' it outputs only '[latest]', so that i dont even know which version it tries to install.. could be possible to display the version considered ? |