在为树莓派1编译时使用-march gcc选项时,使用的正确架构是什么? 我见过armv6,armv6h和armv6l,我不确定哪一个是正确的。
when using the -march gcc option when compiling for a raspberry pi 1, what is the correct architecture to use? I've seen armv6, armv6h, and armv6l and am not sure which one is correct.
最满意答案
如果您有权访问r上的命令行。 你可以用命令检查架构
uname -a
要么
cat / proc / cpuinfo
如果您有任何随r提供的文档资源。 pi - 您可以浏览它或在此发布,以便人们可以浏览它。
I am copying this from the raspberry pi stackexchange, in case the raspberry pi stack exchange disappears. https://raspberrypi.stackexchange.com/questions/2046/which-cpu-flags-are-suitable-for-gcc-on-raspberry-pi
"The RPI ARM core is an ARM 1176jzf-S, the suitable flags should then be
-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp Drop the -mfloat-abi=hard -mfpu=vfp when on a soft float distro.
These flags can be found by running gcc -mcpu=native -march=native -Q --help=target on gcc >= 4.7`"
正确的架构为树莓派1(Correct architecture for the raspberry pi 1)在为树莓派1编译时使用-march gcc选项时,使用的正确架构是什么? 我见过armv6,armv6h和armv6l,我不确定哪一个是正确的。
when using the -march gcc option when compiling for a raspberry pi 1, what is the correct architecture to use? I've seen armv6, armv6h, and armv6l and am not sure which one is correct.
最满意答案
如果您有权访问r上的命令行。 你可以用命令检查架构
uname -a
要么
cat / proc / cpuinfo
如果您有任何随r提供的文档资源。 pi - 您可以浏览它或在此发布,以便人们可以浏览它。
I am copying this from the raspberry pi stackexchange, in case the raspberry pi stack exchange disappears. https://raspberrypi.stackexchange.com/questions/2046/which-cpu-flags-are-suitable-for-gcc-on-raspberry-pi
"The RPI ARM core is an ARM 1176jzf-S, the suitable flags should then be
-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp Drop the -mfloat-abi=hard -mfpu=vfp when on a soft float distro.
These flags can be found by running gcc -mcpu=native -march=native -Q --help=target on gcc >= 4.7`"
发布评论