mips linux 编译器,linux - MIPS的交叉编译器似乎无法创建有效的程序 - 堆栈内存溢出...
我已經使用buildroot設置了一個交叉編譯器。
目標設備正在運行Linux,并且具有MIPS處理器(這是Dreambox dm500hd)。
Buildroot配置(僅更改的內容):
目標配置
體系結構:MIPS(小端)
體系結構變體:通用MIPS32
工具鏈配置
[*]啟用C ++支持
[*]啟用編譯器鏈接時間優化支持
我遵循了設置過程,并且buildroot使編譯器成功(mips-linux-gcc和g ++)。
Hello World文件(test-mips.cpp)
#include
using namespace std;
int main() {
cout << "hello world";
return 0;
}
我可以編譯Hello World,但是在目標設備上運行它時會引發錯誤:
dm500hd:~$ ./test-mips
./test-mips: line 1: EL@4?�P4: not found
./test-mips: line 1: syntax error: unexpected word (expecting ")")
僅當我為little-endian構建編譯器時,才會出現奇怪的字符:使用big-endian編譯的程序的錯誤是相同的,但使用空格而不是? .。
我嘗試了小字節序和大字節序,但問題是相同的。 那么在配置buildroot時我做錯了什么嗎?
注意 : cat /proc/cpuinfo游戲給我這個結果。 我應該更改架構變體嗎?
system type : BCM7413B1 STB platform
processor : 0
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : Brcm4380 V4.4 FPU V0.1
BogoMIPS : 403.45
cpu MHz : 405.010
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : no
ASEs implemented : mips16
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
總結
以上是生活随笔為你收集整理的mips linux 编译器,linux - MIPS的交叉编译器似乎无法创建有效的程序 - 堆栈内存溢出...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c语言贪心算法排课,*排课软件常用算法介
- 下一篇: linux拨号软件,Linux 下的宽带