Bugzilla – Bug 145783
cross-avr-binutils: linker bug?
Last modified: 2006-01-27 00:52:17 UTC
# cat > test.c << EOF #include <stdio.h> int main(void) { printf("Hello world!\n"); return(0); } EOF # avr-gcc -Wall -O2 -o test.elf test.c /opt/cross/lib/gcc/avr/4.1.0/../../../../avr/bin/ld: this linker was not configured to use sysroots I'm sure this worked with binutils 2 weeks ago from STABLE. I'll check the version (rpm changelog). Maybe "--with-build-sysroot=sysroot" is missing as configure option?
Hmm ... downgrading to binutils 2.16.91.0.4 didn't help. :-( I tried this one: --> /work/SAVE/oldpackages/stable/binutils/binutils-20060112 Latest RPM entry: ------------------------------------------------------------------- Tue Jan 3 10:04:06 CET 2006 - dmueller@suse.de - Don't create empty rpath components when stripping
--with-sysroot=/ is the problem. I don't think cross-avr-gcc should use that, or rather should use a real sysroot, which needs to be mirrored by cross-avr-binutils then.
Thanks. Disabling sysroot for gcc build fixes this problem. I'll submit an updated gcc package to STABLE once the mbuild is ready.
If the avr guys want to use a real sysroot I'll let them deal with that, but switching off --with-sysroot=/ for cross-avr is fine too. It's only there for SSP support, and I think that's not very relevant for the AVR platform.
I agree. And now I understand why it still worked 2 weeks ago. Using the --with-sysroot option for the gcc build is a new feature since about 2 weeks.
New gcc package submitted.