在x86 linux上使用软件浮点 [英] Using software floating point on x86 linux
问题描述
$ gcc -m32 -msoft-float -lm -o test test.c
/tmp/cc8RXn8F.o:在函数`main'中:
test.c :( .text + 0x39):未定义引用`__muldf3'
collect2:ld返回1退出状态
除非你想手动引导你的整个工具链,否则你可以从 Is it (easily) possible to use software floating point on i386 linux without incurring the expense of trapping into the kernel on each call? I've tried -msoft-float, but it seems the normal (ubuntu) C libraries don't have a FP library included:
Unless you want to bootstrap your entire toolchain by hand, you could start with uclibc toolchain (the i386 version, I imagine) -- soft float is (AFAIK) not directly supported for "native" compilation on debian and derivatives, but it can be used via the "embedded" approach of the uclibc toolchain. 这篇关于在x86 linux上使用软件浮点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!$ gcc -m32 -msoft-float -lm -o test test.c
/tmp/cc8RXn8F.o: In function `main':
test.c:(.text+0x39): undefined reference to `__muldf3'
collect2: ld returned 1 exit status