ARM Linux GCC 环境搭建

使用树莓派centos7 搭建arm-linux-gcc环境。

1. 上传文件到服务器。

2. 解压crosstool-0.43.tar.gz

tar xzf crosstool-0.43.tar.gz

3. 添加补丁文件

cp glibc-2.3.6-version-info.h_err.patch crosstool-0.43/patches/glibc-2.3.6/

4. 打补丁

patch -p1 < ../crosstool.patch

5. 修改demo-arm-softfloat.sh

vim demo-arm-softfloat.sh

6. 修改arm-softfloat.dat

vim arm-softfloat.dat

7. 修改all.sh

vim all.sh

8. 第一次编译

切换普通用户再切换root

./demo-arm-softfloat.sh

9. 编译出错

10. 修改Makefile

/home/kyj/Tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/glibc-2.3.6/manual

目录下Makefile

把:

chapters.% top-menu.%: libc-texinfo.sh $(texis) Makefile

AWK=$(AWK) $(SHELL) $< '$(chapters)' '$(add-chapters)' '$(appendices)'

修改成:

chapters.%: libc-texinfo.sh $(texis) Makefile

AWK=$(AWK) $(SHELL) $< '$(chapters)' '$(add-chapters)' '$(appendices)'

top-menu.%: libc-texinfo.sh $(texis) Makefile

AWK=$(AWK) $(SHELL) $< '$(chapters)' '$(add-chapters)' '$(appendices)'

把:

$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:

$(make-target-directory)

touch $@

修改成:

$(objpfx)stubs:

$(make-target-directory)

touch $@

../po/manual.pot:

$(make-target-directory)

touch $@

$(objpfx)stamp%:

$(make-target-directory)

touch $@

11. 修改all.sh

12. 重新编译

./demo-arm-softfloat.sh

13. 删除文件

rm /home/kyj/Tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-core-prefix/lib/gcc/arm-linux/3.4.5/libgcc_eh.a

rm /home/kyj/Tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-core-prefix/lib/gcc/arm-linux/3.4.5/libgcc_s.a

14. 重新编译

./demo-arm-softfloat.sh

猜你喜欢

转载自blog.csdn.net/boazheng/article/details/89359667