制作mipsel-linux交叉编译工具3
2009-05-25 15:51
519 查看
8 编译动态gcc
现在,所有的准备工作都完成了,可以用前面做出来的binutils、静态gcc、glibc来生成完整的。支持共享库的gcc了。
a)直接使用前用解压缩过的代码。
cd /home/crosstool/tmp/gcc-3.2
b)完成配置和编译
mkdir mipsel-linux-share
cd mipsel-linux-share
../configure
--target=mipsel-linux
--prefix=/usr/local/cross-gcc/mipsel-linux
--with-cpu=mips32
--disable-nls
--enable-threads=posix
--enable-symvers=gnu
--enable-_cxa_atexit
--enable-languages=c,c++
--enable-shared
--enable-c99
--enable-long-long
注意,这里使用了--enable-shared选项,表示这个gcc编译是支持共享库的。
make
make install
9 使用生成的交叉编译工具链
生成的交叉工具链的所有工作文件在/usr/local/cross-gcc/mipsel-linux目录下,可以用它们来编译Linux的核心和应用了。现以编译Linux核心为例说明。在/home/crosstool/tmp/linux目录下就有一个刚配置好的Linux核心,修改/home/crosstool/tmp/linux/Makefile, 使TOOLROOT和CROSS_COMPILE设置正确:
TOOLROOT =/usr/local/cross-gcc/mipsel-linux/
CROSS_COMPILE =:$(TOOLROOT)/bin/mipsel-linux-
修改/home/crosstool/tmp/linux/arch/mips/Makefile,使tool-prefix设置正确:
tool-prefix= /usr/local/cross-gcc/mipsel-linux/bin/mipsel-linux-
回到/home/crosstool/tmp/linux
cd/home/crosstool/tmp/linux
make
成功完成编译后,生成的Linux核心就在/home/crosstool/tmp/
linux/vmlinux文件。
现在,所有的准备工作都完成了,可以用前面做出来的binutils、静态gcc、glibc来生成完整的。支持共享库的gcc了。
a)直接使用前用解压缩过的代码。
cd /home/crosstool/tmp/gcc-3.2
b)完成配置和编译
mkdir mipsel-linux-share
cd mipsel-linux-share
../configure
--target=mipsel-linux
--prefix=/usr/local/cross-gcc/mipsel-linux
--with-cpu=mips32
--disable-nls
--enable-threads=posix
--enable-symvers=gnu
--enable-_cxa_atexit
--enable-languages=c,c++
--enable-shared
--enable-c99
--enable-long-long
注意,这里使用了--enable-shared选项,表示这个gcc编译是支持共享库的。
make
make install
9 使用生成的交叉编译工具链
生成的交叉工具链的所有工作文件在/usr/local/cross-gcc/mipsel-linux目录下,可以用它们来编译Linux的核心和应用了。现以编译Linux核心为例说明。在/home/crosstool/tmp/linux目录下就有一个刚配置好的Linux核心,修改/home/crosstool/tmp/linux/Makefile, 使TOOLROOT和CROSS_COMPILE设置正确:
TOOLROOT =/usr/local/cross-gcc/mipsel-linux/
CROSS_COMPILE =:$(TOOLROOT)/bin/mipsel-linux-
修改/home/crosstool/tmp/linux/arch/mips/Makefile,使tool-prefix设置正确:
tool-prefix= /usr/local/cross-gcc/mipsel-linux/bin/mipsel-linux-
回到/home/crosstool/tmp/linux
cd/home/crosstool/tmp/linux
make
成功完成编译后,生成的Linux核心就在/home/crosstool/tmp/
linux/vmlinux文件。
相关文章推荐
- 制作mipsel-linux交叉编译工具
- 制作mipsel-linux交叉编译工具2
- 制作mipsel-linux交叉编译工具(转)
- 制作mipsel-linux交叉编译工具1
- 制作mipsel-linux交叉编译工具
- arm-linux-gcc 3.4.6 + linux 2.6.22.6交叉编译工具链制作
- redhat enterprise 6.1 平台制作 arm-none-linux-gnueabi交叉编译工具莲
- [Linux]:crosstool制作arm-linux交叉编译工具链
- 2.使用crosstool制作ARM-Linux交叉编译工具链
- 在进行嵌入式开发之前,首先要建立一个交叉编译环境,这是一套编译器、连接器和libc库等组成的开发环境。文章通过一个具体的例子说明了这些嵌入式交叉编译开发工具的制作过程。 随着消费类电子产品的大量开发和应用和Linux操作系统的不断健壮和强大,嵌入式系统越来
- Linux ARM交叉编译工具链制作过程
- 使用uclibc的buildroot制作交叉编译工具链 ,arm-linux-gcc
- Linux ARM交叉编译工具链制作过程【转】
- Linux ARM交叉编译工具链制作过程
- 全手工制作arm-linux交叉编译工具链《二》
- Linux:crosstool-ng制作自己的交叉编译工具
- arm-linux交叉编译工具链制作
- crosstool-ng制作交叉编译工具链(powerpc-linux)
- 全手工制作arm-linux交叉编译工具链
- 手工制作arm-linux-gcc交叉编译工具链Binutils时可能会出现的makeinfo编译错误