Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ g++;从x86编译ARM Cortex_C++_C_Gcc_G++_Arm - Fatal编程技术网

C++ g++;从x86编译ARM Cortex

C++ g++;从x86编译ARM Cortex,c++,c,gcc,g++,arm,C++,C,Gcc,G++,Arm,我想从我的工作站编译一个ARM Cortex-9a。 我找到了这个 如果我是对的,有可能这样做吗? 我用过 gcc --version gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388] 并希望使用列出的标志进行编译() g++-O3-mtune=cortex-a9 main.cc-o main.o-c main.cc:1:0:错误:错误值(cortex-a9),用于-mtune=开关 #包括 ^ 我真的需要工具链

我想从我的工作站编译一个ARM Cortex-9a。 我找到了这个

如果我是对的,有可能这样做吗? 我用过

gcc --version
gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]
并希望使用列出的标志进行编译()

g++-O3-mtune=cortex-a9 main.cc-o main.o-c
main.cc:1:0:错误:错误值(cortex-a9),用于-mtune=开关
#包括
^
我真的需要工具链吗?我以为它们只是为了“更简单”的使用

编辑
对我来说,使用crosstools ng是最好和最简单的方法

你需要一个交叉编译器。@EOF,谢谢,我只找到了cross-armv7hl-gcc49这个包或cross-armv6hl-gcc49,但我使用cortex 9a:-/ARM指令集版本编号很混乱。我认为cortex9a是arm7,但不要引用我的话。编辑:维基百科同意,这是arm7a。(困惑了吗?)看看如何构建交叉编译器;它消除了一些头痛。实际上,大部分头痛:)
g++ -O3 -mtune=cortex-a9 main.cc -o main.o -c
main.cc:1:0: error: bad value (cortex-a9) for -mtune= switch
 #include <stdio.h>
 ^