~jeffpc/avr-common#2: 
Link against libgcc.a

Most importantly, it contains various math functions for microcontrollers that don't support all the math instructions.

Unfortunately, the path to libgcc.a is OS dependent. For example, on FreeBSD the avr-gcc package ships its libgcc.a for ATmega48 and similar in:

/usr/local/lib/gcc/avr/11.2.0/avr4/libgcc.a

It actually ships 3 variants for avr4: (unqualified), long-double32, and double64:

/usr/local/lib/gcc/avr/11.2.0/avr4/double64/libgcc.a
/usr/local/lib/gcc/avr/11.2.0/avr4/libgcc.a
/usr/local/lib/gcc/avr/11.2.0/avr4/long-double32/libgcc.a

These paths are obviously not universal, so we can't hard-code them.

Status
REPORTED
Submitter
~jeffpc
Assigned to
No-one
Submitted
1 year, 10 months ago
Updated
1 year, 10 months ago
Labels
feature