Cython编译错误:'-mno-fused-madd' [英] Cython compilation errors: '-mno-fused-madd'

查看:243
本文介绍了Cython编译错误:'-mno-fused-madd'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我编译Cython代码(使用 pyximport )和频繁地从源代码安装软件包( pip )我得到

Whenever I compile Cython code (using pyximport) and frequently when I install packages from source (with pip) I get

clang: warning: argument unused during compilation: '-mno-fused-madd'

这个警告是什么,我能做些什么来防止它?我怀疑我可能无法防止当 pip 触发它,但是至少有一些方法配置 pyximport 以避免它?

What is this warning and what can I do to prevent it? I suspect I may not be able to prevent when pip triggers it, but is thre at least some way to configure pyximport to avoid it?

OS X 10.9,Python 2.7.5,Xcode clang 500.2.79

OS X 10.9, Python 2.7.5, Xcode clang 500.2.79

推荐答案

-mno-fused-madd 是gcc cpu目标选项。它用于启用/禁用生成融合乘法/加法指令(FMAC,通用于DSP)。

-mno-fused-madd is a gcc cpu target option. It is for enabling/disabling the generation of the fused multiply/add instructions (FMACs. Common in DSPs).

由于这是gcc特定的,clang给出一个警告,它不明白该选项。

Since this is gcc-specific, clang gives a warning that it doesn't understand the option.

如果你真的不想看到这个警告,你可以尝试设置默认编译器

If you really don't want to see this warning you could try setting the default compiler by

env CC=/usr/bin/gcc pip install ...

这也应该适用于pyximport(但我还没有试过)。

This should also work for pyximport too (But I haven't tried).

这篇关于Cython编译错误:'-mno-fused-madd'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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