patchAVR C Runtime Library - Patches: patch #5377, Fix for multiple dufinition error

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5377: Fix for multiple dufinition error

Submitter:  None
Submitted:  Fri 08 Sep 2006 10:30:50 PM UTC
   
 
Category:  None Priority:  7 - High
Status:  Wont Do Privacy:  Public
Assigned to:  None Originator Email:  -email is unavailable-
Open/Closed:  Closed

Wed 13 Sep 2006 08:58:33 PM UTC, comment #1: 

I agree with Björn here that renaming these functions is a
bad idea.  They have been deliberately named that way in
order to provide overrides for the bloated functions with
the same name that are in libgcc.a (they are produced from
C code, the fplib versions are hand-tuned assembly).

The entire architecture of our current libm is debatable.
Those functions that are meant to supersede libgcc.a
functions should rather be moved out to GCC, but that's not
possible the way libm/fplib is created right now, as
everything is a large plate full of spaghetti.  However,
throwing that spaghetti away without a well-designed
replacement cannot be a solution either.

Right now, you simply have to add -lm to your linker command
line (in C++, you even have to add ${PATH_TO_LIBM}/libm.a,
but I still believe this is a GCC bug).

Joerg Wunsch <joerg_wunsch>
Group administrator
Fri 08 Sep 2006 10:30:50 PM UTC, original submission:  

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):/home/anunez/atmel/compilerBuild_41/gcc/fp-bit.c:1334: first defined here
make: * [frff.out] Error 1

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.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10715:  floatsisf.fix added by None (675B - application/octet-stream - Fix to rename __floatsisf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-09-13 joerg_wunsch StatusNone Wont Do
    Open/ClosedOpen Closed
2006-09-13 arcanum Priority5 - Normal 7 - High
2006-09-08 None Attached File- Added floatsisf.fix, #10715

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code