Tilera 交叉编译 - 关于此错误的任何想法:未知的 asm 约束字母
无论何时在代码中调用 m_NCS_SEL_OBJ_ZERO(&nSelObjSet) 等 OSAF 调用,我们都会遇到这些约束错误。这是使用tilera编译器-tile-g++进行交叉编译时的情况。使用 g++ 它总是编译得很好。任何指示都会有帮助。
注意:m_NCS_SEL_OBJ_ZERO 是一个宏,被 FD_ZERO 替代
示例代码:
// initialise and set selection object set
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
m_NCS_SEL_OBJ_SET(nMdsSelObj, &nSelObjSet);**
错误如下:
/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx:
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'c'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'D'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'a'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 110: error:
unknown asm constraint letter 'q'
if (m_NCS_SEL_OBJ_ISSET(nMdsSelObj, &nSelObjSet))
^
4 errors detected in the compilation of "/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx".
/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/EnbCfgMgr.cxx:
Arun L.
We are getting these constraint errors wherver OSAF calls like m_NCS_SEL_OBJ_ZERO(&nSelObjSet) is called in our code. This is while cross compiling using tilera compiler - tile-g++. With g++ it always compiles fine. Any pointers would be helpful.
Note: m_NCS_SEL_OBJ_ZERO is a macro and replaced by FD_ZERO
Sample Code:
// initialise and set selection object set
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
m_NCS_SEL_OBJ_SET(nMdsSelObj, &nSelObjSet);**
Errors are as follows:
/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx:
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'c'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'D'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 103: error:
unknown asm constraint letter 'a'
m_NCS_SEL_OBJ_ZERO(&nSelObjSet);
^
"/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx", line 110: error:
unknown asm constraint letter 'q'
if (m_NCS_SEL_OBJ_ISSET(nMdsSelObj, &nSelObjSet))
^
4 errors detected in the compilation of "/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/ConfigManagerThread.cxx".
/u/TILERA/STACK/DEV/lte/lte_enb/enb_cfgmgr/src/EnbCfgMgr.cxx:
Arun L.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题在于您的交叉编译构建是从主机系统获取标头,而不是适合目标的标头。
这些“未知”asm 约束字母是 i386 特定的字母,用于 glibc 的 FD_ZERO() 和 FD_ISSET() 的 i386 特定定义。
The problem is that your cross-compiled build is picking up headers from the host system, rather than headers that are suitable for the target.
These "unknown" asm constraint letters are i386-specific ones that are used in glibc's i386-specific definitions of FD_ZERO() and FD_ISSET().