在 x86 linux 上使用软件浮点 [英] Using software floating point on x86 linux

查看:28
本文介绍了在 x86 linux 上使用软件浮点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否(很容易)可以在 i386 linux 上使用软件浮点而不产生每次调用时陷入内核的费用?我试过 -msoft-float,但似乎普通(ubuntu)C 库没有包含 FP 库:

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:

$ 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

推荐答案

除非您想要手动引导整个工具链,否则您可以从 uclibc 工具链(我想是 i386 版本)——软浮点(AFAIK)不直接支持本机"编译debian 和衍生产品,但它可以通过 uclibc 工具链的嵌入式"方法使用.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆