clang - 我遇到了此错误消息 : 'regparm' is not valid on this platform

标签 clang llvm

我的构建和主机平台是带有 suse Linux 的 X86_64。我的目标平台是 arm-linux-gnueabi。
我用版本 3.6.0 的 clang 编译源代码。编译器使用 -target = arm-linux-gnueabi 运行
我失败了以下信息

/usr/include/pthread.h:655:6: error: 'regparm' is not valid on this platform
     __cleanup_fct_attribute;
     ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/bits/pthreadtypes.h:222:50: note: expanded from macro '__cleanup_fct_attribute'
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
                                                 ^            ~

问题是什么?

最佳答案

你的问题是什么? 'regparm' 是 x86-only 属性,所以这里的编译器是正确的,你的代码被破坏了。很可能您没有为目标平台使用正确的 header 。

关于clang - 我遇到了此错误消息 : 'regparm' is not valid on this platform,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37812531/

相关文章:

c++ - LLVM 段错误/需要使用指令而不是指令*

llvm - MSIL 和 LLVM 位码有什么区别?

python - 导入错误: No module named 'llvmlite.llvmpy.ee'

objective-c - 我如何有选择地忽略 clang 关于使用已弃用的 objective-c 实现的警告?

c - Xcode调试窗口如何改变unicode字符串的显示格式?

Xcode 5.1 启用 C++14

c++ - 在 CMake 项目中编译后添加自定义 llvm 优化命令 (opt)

c - 在另一台机器上运行从 clang+llvm 编译的程序

c - 允许在信任边界进行冗余空指针检查

python-3.x - Python3.8 无法安装 shap、llvmlite 或 numba