在MIPS上编译 - ASM

时间:2015-02-19 16:40:44

标签: assembly mips ci20

我试图在我的新Ci20上编译Plex家庭影院但是我遇到了一些我认为与ASM相关的构建错误,对ASM一无所知我想知道是否有人能够提供任何协助。

构建错误

[ 19%] Building CXX object xbmc/CMakeFiles/xbmc.dir/GUIInfoManager.cpp.o
In file included from /home/ci20/plex-home-theater-public/xbmc/linux/PlatformInclude.h:25:0,
             from /home/ci20/plex-home-theater-public/xbmc/system.h:254,
             from /home/ci20/plex-home-theater-public/xbmc/network/Network.h:26,
             from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:21:
/home/ci20/plex-home-theater-public/xbmc/linux/XHandlePublic.h:41:1: warning: ‘__stdcall__’ attribute directive ignored [-Wattributes]
In file included from /home/ci20/plex-home-theater-public/xbmc/linux/PlatformInclude.h:27:0,
             from /home/ci20/plex-home-theater-public/xbmc/system.h:254,
             from /home/ci20/plex-home-theater-public/xbmc/network/Network.h:26,
             from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:21:
/home/ci20/plex-home-theater-public/xbmc/linux/XTimeUtils.h:28:39: warning: ‘__stdcall__’ attribute directive ignored [-Wattributes]
In file included from /home/ci20/plex-home-theater-public/xbmc/GUIInfoManager.cpp:55:0:
/home/ci20/plex-home-theater-public/xbmc/utils/MathUtils.h: In function ‘int MathUtils::round_int(double)’:
/home/ci20/plex-home-theater-public/xbmc/utils/MathUtils.h:150:6: error: unknown register name ‘st’ in ‘asm’
make[2]: *** [xbmc/CMakeFiles/xbmc.dir/GUIInfoManager.cpp.o] Error 1
make[1]: *** [xbmc/CMakeFiles/xbmc.dir/all] Error 2
make: *** [all] Error 2

/xbmc/utils/MathUtils.h

https://github.com/plexinc/plex-home-theater-public/blob/pht-frodo/xbmc/utils/MathUtils.h

非常感谢任何指导!

1 个答案:

答案 0 :(得分:2)

问题是DISABLE_MATHUTILS_ASM_ROUND_INT没有设置,因此,由于没有MIPS版本,编译器正在尝试编译默认的x86 asm版本,这显然不会起作用。

仔细看,你应该扩展从第35行开始的条件来检测你的MIPS并禁用asm代码。或者作为快速黑客,您可以在第50行添加无条件#define DISABLE_MATHUTILS_ASM_ROUND_INT#define DISABLE_MATHUTILS_ASM_TRUNCATE_INT以使其编译。

代码的逻辑似乎有缺陷,他们应该专门只在他们拥有asm代码的架构上启用asm代码,而不是相反...