为何crossdev制作出来的交叉编译工具链没有g++?
时间:2008-04-14
来源:互联网
crossdev -s4 -S arm-elf-linux-gnu
不过,制作出来的只有gcc。下面是输出:
chris ~ # crossdev -s4 -S arm-elf-linux-gnu
------------------------------------------------------------------------------------------------------------------------------------
* Host Portage ARCH: x86
* Target Portage ARCH: arm
* Target System: arm-elf-linux-gnu
* Stage: 4 (C/C++ compiler)
* binutils: binutils-[stable]
* gcc: gcc-[stable]
* headers: linux-headers-[stable]
* libc: glibc-[stable]
* PORTDIR_OVERLAY: /usr/portage/local/layman/gentoo-china
* PORT_LOGDIR: /var/log/portage
* PKGDIR: /usr/portage/packages/cross/arm-elf-linux-gnu
* PORTAGE_TMPDIR: /var/tmp/cross/arm-elf-linux-gnu
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ -
* Using sys-devel/binutils from /usr/portage instead of /usr/portage
* Using sys-devel/gcc from /usr/portage instead of /usr/portage
* Using sys-kernel/linux-headers from /usr/portage instead of /usr/portage
* Using sys-libs/glibc from /usr/portage instead of /usr/portage
* Using sys-devel/gdb from /usr/portage instead of /usr/portage
* Using dev-util/insight from /usr/portage instead of /usr/portage
* Forcing the latest versions of {binutils,gcc}-config/gnuconfig ... [ ok ]
* Log: /var/log/portage/cross-arm-elf-linux-gnu-binutils.log
* Emerging cross-binutils ... [ ok ]
* Log: /var/log/portage/cross-arm-elf-linux-gnu-gcc-stage1.log
* Emerging cross-gcc-stage1 ... [ ok ]
* Log: /var/log/portage/cross-arm-elf-linux-gnu-linux-headers.log
* Emerging cross-linux-headers ... [ ok ]
* Log: /var/log/portage/cross-arm-elf-linux-gnu-glibc.log
* Emerging cross-glibc ... [ ok ]
* Log: /var/log/portage/cross-arm-elf-linux-gnu-gcc-stage2.log
* Emerging cross-gcc-stage2 ... [ ok ]
chris ~ #
最后生成的只有这么些个东西
bigcat@chris ~/work/arm/root/soft/openssh-4.7p1 $ arm-elf-linux-gnu-
arm-elf-linux-gnu-addr2line arm-elf-linux-gnu-gcc arm-elf-linux-gnu-ld arm-elf-linux-gnu-readelf
arm-elf-linux-gnu-ar arm-elf-linux-gnu-gcc-4.2.3 arm-elf-linux-gnu-nm arm-elf-linux-gnu-size
arm-elf-linux-gnu-as arm-elf-linux-gnu-gccbug arm-elf-linux-gnu-objcopy arm-elf-linux-gnu-strings
arm-elf-linux-gnu-c++filt arm-elf-linux-gnu-gcov arm-elf-linux-gnu-objdump arm-elf-linux-gnu-strip
arm-elf-linux-gnu-cpp arm-elf-linux-gnu-gprof arm-elf-linux-gnu-ranlib
thx
作者: mmkiller 发布时间: 2008-04-14
找vapier吧
作者: zhllg 发布时间: 2008-04-14
找vapier吧
作者: zhllg 发布时间: 2008-04-14
可能是elf的只有gcc.
作者: mmkiller 发布时间: 2008-04-14
作者: lzlz 发布时间: 2008-04-14
至于生成g++ , 默认就是s4的嘛, crossdev 看一下帮助就能出来信息了,很好用,一个命令下去就等着编译好的工具链了,太方便了,如果楼主想折腾嵌入式方面的话,可以google openembedded,这个鸟东东是参考gentoo portage来设计的,目前 openmoko(一个开源手机项目)就用的是openembedded来搭的
作者: axlrose 发布时间: 2008-04-14
我试过默认和+了-s4参数,arm-elf-linux-gnu出来的都是没有g++。。
谢谢楼上两位的建议。openembbed、EABI还真的没听过
作者: mmkiller 发布时间: 2008-04-14
gentoo crossdev mini howto
$Id$
1. set PORTATE_OVERLAY in /etc/make.conf
echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf
2. emerge crossdev
emerge -av crossdev
3. select CTARGET (powerpc for instance here), Setup 'categories'.
mkdir -p /etc/portage
echo cross-powerpc-unknown-linux-gnu >> /etc/portage/categories
4. make neccessary package symlinks
mkdir -p /usr/local/portage/cross-powerpc-unknown-linux-gnu
cd /usr/local/portage/cross-powerpc-unknown-linux-gnu
ln -s /usr/portage/sys-devel/binutils binutils
ln -s /usr/portage/sys-devel/gcc gcc
ln -s /usr/portage/sys-kernel/linux-headers linux-headers
ln -s /usr/portage/sys-libs/glibc glibc
5. emerge binutils
about USE flags, please look at [1]
emerge -av cross-powerpc-unknown-linux-gnu/binutils
6. emerge bootstrap gcc (Pass 1)
make sure only "nocxx" and "bootstrap" are selected:
USE="nocxx bootstrap -fortran -mudflap -nls" emerge -av cross-powerpc-unknown-linux-gnu/gcc
also use gcc-config to select the new (cross) gcc:
gcc-config -l # to list gccs
gcc-config XXX
7. emerge linux-headers
emerge -av cross-powerpc-unknown-linux-gnu/linux-headers
8. emerge glibc
emerge -av cross-powerpc-unknown-linux-gnu/glibc
make sure "nptl ntplonly" is in USE flags if you wan't nptl.
USE="ntpl nptlonly" emerge -av cross-powerpc-unknown-linux-gnu/glibc
9. emerge gcc (Pass 2), with c and c++ compilers:
make sure "nocxx" is not set, you could also enalbe "nls" or "mudflap" if
you like.
emerge -av cross-powerpc-unknown-linux-gnu/gcc
10. build stuff
When you go to emerge packages, you should just need to do:
ROOT=/blah/ CHOST=powerpc-unknown-linux-gnu emerge cpio
- you should also set CBUILD to your building machine for
completeness sake ... most of the time you won't need it,
but sometimes you will
- CTARGET is no longer needed so don't set it !
If you want to cross compile a kernel, do this:
make ARCH=powerpc CROSS_COMPILE=powerpc-unknown-linux-gnu-
[1] for step 6, the USE flags should better have "nocxx bootstrap" and no
other flags, they are tested to work on my system. other than step 6, the USE
flags is not abitrary so we could keep it as same as the host system as
possible.
.ref: http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
作者: lzlz 发布时间: 2008-04-14
然后就弄了一下openembedded,发现里面考虑到这个问题,把lib弄到一个指定目录,然后在bbfile里面找lib时指向指定的目录,打补丁也很方便的在SRC_URI里面定义,我觉得会ebuild的朋友一般很快能上手bbfile,当然,学bbfile的时候学一下ebuild觉得相当的有帮助,楼上的兄台要是构建成功的话能否把步骤说一说,因为交叉平台无法 chroot过去,能emerge 很多包了,但遇到库的问题就卡住了,要是这步通了的话我都想在朋友弄的mips的嵌入式板子上跑跑这个通过强大的portage生成的嵌入式系统
顶起来,有关注的朋友加入呀
注意一下,我没试过elf,莫非真的没有? 好办法,楼主弄一个unkonw试一下就对比出来了
作者: axlrose 发布时间: 2008-04-14
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28