I'm sort of new to AVR compiling in General. I'm using an Arduino board, which has an ATMega8 chip on it. I'm not using their IDE, but Makefiles to compile and upload code to the board.
When I create an environment, I have to symlink the ldscripts directory from binutils into the working directory (where the source files are):
ln -s /usr/lib/binutils/avr/2.16.1/ldscripts
If I don't do this, the cross-compiler linker, /usr/libexec/gcc/avr/ld, will fail to create the elf binary:
avr-gcc -mmcu=atmega8 -I. -gstabs -DF_CPU=16000000 -I../../usr/arduino -Os -Wall -Wstrict-prototypes -std=gnu99 ../../usr/arduino/pins_arduino.o ../../usr/arduino/wiring.o ../../usr/arduino/WInterrupts.o blink.o ../../usr/arduino/HardwareSerial.o ../../usr/arduino/WRandom.o --output blink.elf /usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr4.x: No such file or directory make: *** [blink.elf] Error 1
This is even though there are no direct references to the ldscripts directory from the Makefile or any of the source files.
Is there a possibility to build somehow so that one does not need to symlink the ldscripts directory?