SF soft-fp for i386
Ilya Enkovich
enkovich.gnu@gmail.com
Thu Apr 30 14:11:00 GMT 2015
2015-04-30 12:33 GMT+03:00 Kai Ruottu <kai.ruottu@wippies.com>:
> 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'.
>
Thanks! Adding t-fp-bit into config.host for i386 helped to get
required functions in libgcc.
Ilya
More information about the Gcc-help
mailing list