I need to use the power function -- pow(double,double), and I also need floating-point printf support.
However my code won't compile without the dreaded error:
relocation truncated to fit: R_AVR_13_PCREL...
I've been happily using 4.5.1 built using Bingo's script for over a year. But after much study and compiling of compilers, I have boiled down the problem. It is identical to this thread from 2011 and some code from the test-suite:
Further, I found a patch which appeared as if it might fix the error, which led me to recompile my compiler to apply that patch.
But after trying the Atmel 4.6.2 compiler, I built combinations of binutils-2.21 and 2.22, with patches, etc. and have found nothing which can compile that code.
The code will compile fine WITHOUT floating point printf support (as long as you use -lm to link the math lib).
But if you use
-Wl,-u,vfprintf -lprintf_flt -lm
Anyone have a compiler that can accomplish this task?