CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 11453|回复: 16

请问A80 Linux应用程序 编译器应该用什么?

[复制链接]
发表于 2015-6-3 10:51:36 | 显示全部楼层 |阅读模式
请问A80 Linux应用程序 编译器应该用什么?
回复

使用道具 举报

发表于 2015-6-3 16:11:55 | 显示全部楼层



在板子直接用gcc编译就好
$ apt-get insatll build-essential
$ gcc test.c -o test
回复 支持 反对

使用道具 举报

发表于 2015-6-3 16:14:20 | 显示全部楼层
sunbeyond 发表于 2015-6-3 16:11
在板子直接用gcc编译就好
$ apt-get insatll build-essential
$ gcc test.c -o test

在pc上: 我用arm-linux-gnueabihf-gcc 交叉编译。  
$sudo apt-get install gcc-arm-linux-gnueabihf

$ arm-linux-gnueabihf-gcc test.c -o test
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-6-3 19:51:33 | 显示全部楼层
sunbeyond 发表于 2015-6-3 16:14
在pc上: 我用arm-linux-gnueabihf-gcc 交叉编译。  
$sudo apt-get install gcc-arm-linux-gnueabihf

谢谢回复,但是我试过gcc-arm-linux-gnueabihf不行,编译的helloworld在板子上不能执行
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-6-3 19:57:18 | 显示全部楼层
sunbeyond 发表于 2015-6-3 16:11
在板子直接用gcc编译就好
$ apt-get insatll build-essential
$ gcc test.c -o test

lichee的系统上不能执行apt-get install,另外头大的是,我找到的arm-none-linux-gnueabi可以编译应用程序且在lichee上运行,但却不能支持硬浮点,不能支持硬浮点是个最头大的问题。
回复 支持 反对

使用道具 举报

发表于 2015-6-4 20:37:27 | 显示全部楼层



性能这么高的开发板,不需要交叉编译了。。。直接编译就行
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-6-5 11:48:53 | 显示全部楼层
itfanr 发表于 2015-6-4 20:37
性能这么高的开发板,不需要交叉编译了。。。直接编译就行

你说得没错,但是我们用的是lichee的基本系统,不用lubuntu的,连apt-get insatll都没法执行。
除非我们能拿到A80的lubuntu的源码,编译出相应的固件,可以考虑用一下。

我后面试试上lubuntu看能不能行。
回复 支持 反对

使用道具 举报

发表于 2015-6-5 11:59:50 | 显示全部楼层
lr6410 发表于 2015-6-3 19:51
谢谢回复,但是我试过gcc-arm-linux-gnueabihf不行,编译的helloworld在板子上不能执行
...

我试了一下。可以啊。 我用的是ubuntu 12.04 64 位,
交叉编译工具版本
sam@sam-System-Product-Name:/work/my-make-image$ arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.6.3 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include --with-headers=/usr/arm-linux-gnueabihf/include --with-libs=/usr/arm-linux-gnueabihf/lib
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
sam@sam-System-Product-Name:/work/my-make-image
回复 支持 反对

使用道具 举报

 楼主| 发表于 2015-6-5 13:55:30 | 显示全部楼层
sunbeyond 发表于 2015-6-5 11:59
我试了一下。可以啊。 我用的是ubuntu 12.04 64 位,
交叉编译工具版本
sam@sam-System-Product-Name:/wo ...

非常感谢!

我的宿主机也是ubuntu12.04 64位。你的arm-linux-gnueabihf-gcc是apt-get install出来的,还是下载的解压安装包,还是什么?请告诉我,我试试
回复 支持 反对

使用道具 举报

发表于 2015-6-5 14:01:19 | 显示全部楼层
lr6410 发表于 2015-6-5 13:55
非常感谢!

我的宿主机也是ubuntu12.04 64位。你的arm-linux-gnueabihf-gcc是apt-get install出来的,还 ...

apt-get install   你标题不是写着linux吗。这边都误解了。  
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-3 01:26 , Processed in 0.026236 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部