avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-libc-dev] [patch #5377] Fix for multiple dufinition error


From: Björn Haase
Subject: Re: [avr-libc-dev] [patch #5377] Fix for multiple dufinition error
Date: Sat, 9 Sep 2006 11:10:23 +0200
User-agent: KMail/1.7.1

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.
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]