anonymous wrote on Samstag, 9. September 2006 00:30 :
> URL:
>   <http://savannah.nongnu.org/patch/?5377>
>
>                  Summary: Fix for multiple dufinition error
>                  Project: AVR C Runtime Library
>             Submitted by: None
>             Submitted on: Friday 09/08/2006 at 22:30 UTC
>                 Category: None
>                 Priority: 5 - Normal
>                   Status: None
>                  Privacy: Public
>              Assigned to: None
>         Originator Email:
>              Open/Closed: Open
>
>     _______________________________________________________
>
> Details:
>
> Fix to fix the multiple definitions of __floatsisf:
>
> avr-gcc -g -mmcu=atmega16 -Os -mcall-prologues -o frff.out
> -Wl,-Map,frff.map *.o
> /home/anunez/atmel/linker/lib/gcc/avr/4.1.0/../../../../avr/lib/avr5/libc.a
>(floatsisf.o): In function `__floatunssisf':
> ../../../libm/fplib/floatsisf.S:65: multiple definition of `__floatsisf'
> /home/anunez/atmel/linker/lib/gcc/avr/4.1.0/avr5/libgcc.a(_si_to_sf.o):/hom
>e/anunez/atmel/compilerBuild_41/gcc/fp-bit.c:1334: first defined here
> make: *** [frff.out] Error 1

I don't think that renaming the library function is a good idea. You will have 
bloated code. The right solution would be to move the fp functions to 
libgcc1. Mabe the best solution meanwhile would be to manually excecute 
avr-ld so that you could control yourself, which order should be chosen for 
the libs. Or you could use avr-gcc for linking instead of avr-g++.

On the way to a true solution of this issue:
As a first step, we probably should ask the authors of the fp lib in avr-libc 
if they are willing to sign papers with the FSF, in that case, we could get 
assembly optimized fp integrated into mainline gcc. This will still take 
time, but the papers will be an essential requirement.

Bjoern.

> I supposed this is just temporal problem until libc and libm get integrated
> but for the time being the fix. For the time being I just renamed
> __floatsisf in libm/fplib/floatsisf.S and it worked fined.
>
> I used avr-libc 1.4.4 and gcc 4.1.0. The problem arised when initializing a
> float variable with atof.
>


_______________________________________________
AVR-libc-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to