bugAVR C Runtime Library - Bugs: bug #19771, multiple definition of `__fixsfsi'

 
 

bug #19771: multiple definition of `__fixsfsi'

Submitted by:  Sean D Epagnier <geckosenator>
Submitted on:  Wed 02 May 2007 07:10:49 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: DuplicatePercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Open/Closed: Closed
Release: NoneFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 02 May 2007 07:52:06 AM UTC, comment #1:

This is essentially a duplicate for bug #3485.

In your particular case, your fault was to add -lm before
forcing the undefined reference to the floating-point version
of vfprintf. Reorder that to

LDFLAGS = -Wl,-u,vfprintf -lprintf_flt -lm

and it should work.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Wed 02 May 2007 07:10:49 AM UTC, original submission:

$ avr-gcc -mmcu=atmega168 x.o -o x.elf -lm -Wl,-u,vfprintf -\
lprintf_flt -Wl,-Map=firstmag.map,--cref

/usr/local/avr/lib/gcc/avr/4.1.1/../../../../avr/lib/avr5/libc.a(fixsfsi.o): In function `__fixsfsi':
../../../libm/fplib/fixsfsi.S:57: multiple definition of `__fixsfsi'
/usr/local/avr/lib/gcc/avr/4.1.1/avr5/libgcc.a(_sf_to_si.o):/usr/local/avr/build/gcc-4.1.1/gcc/fp-bit.c:1404: fi\
rst defined here

I am getting this problem with:
LDFLAGS = -lm -Wl,-u,vfprintf -lprintf_flt

The problem always occurs if I don't have a printf
with %f in it in the program, and in some cases where
it does.

If I insert the following code into my program the
problem never occurs:

void dum(void)
{
int c;
printf("%f", (double)c);
}

If I were to declare c as a double, the problem could still
occur.

Should a function be removed from libgcc?

Sean D Epagnier <geckosenator>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Posted a comment)
  • -unavailable- added by geckosenator (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 May 2007 07:52:06 AM UTCjoerg_wunschStatusNone=>Duplicate
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1