30.4.2015, 12:12, Ilya Enkovich kirjoitti:
Hi,
trying to compile a simple soft-fp test on i386 I get multiple link errors:
cat test.c
int main ()
{
float a,b;
return (int)a*b;
}
gcc -msoft-float test.c -m32
/tmp/cc1Zh1Jy.o: In function `main':
test.c:(.text+0x11): undefined reference to `__fixsfsi'
test.c:(.text+0x19): undefined reference to `__floatsisf'
test.c:(.text+0x29): undefined reference to `__mulsf3'
test.c:(.text+0x31): undefined reference to `__fixsfsi'
collect2: error: ld returned 1 exit status
Is there a way to configure libgcc to have implementations for SF
soft-fp functions or it is not supported for i386?
The soft-fp functions are generally available for all CPUs via the
'config/fp-bit.c'.
So just spy the other CPU targets about how to enable a "-msoft" or
something
extra multilib for i386. Last when I did this, using
'-mno-fp-ret-in-i387' or what it
was, was required (to be used) with '-msoft-float'.