你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 12.10搭建RTEMS开发环境(源码包编译)

[日期:2012-12-15] 来源:Linux社区  作者:harborxing [字体:大 中 小]

6.安装gcc:

由于gcc的安装依赖gmp和mpfr,gmp又依赖m4,因此首先安装m4、gmp和mpfr:

安装m4:


apt-get install m4


安装gmp:


cd ../

mkdir build-gmp

cd build-gmp

../gmp-4.2/configure --prefix=/usr/local/gmp(该部分为安装目录)

make

make check

make install

安装mpfr:

cd ../

mkdir build-mpfr

cd build-mpfr

../mpfr-2.4.2/configure --prefix=/usr/local/mpfr --with-gmp=/usr/local/gmp(指定gmp的安装位置)


make


make check

make install


安装gcc:


cd ../

cd gcc-core-4.4.7/

ln -s ../newlib-1.18.0/newlib

cd ../

mkdir build-gcc

cd build-gcc

在/root/.profile中加入以下内容:

export LD_LIBRARY_PATH=/usr/local/mpfr/lib:/usr/local/gmp/lib:${LD_LIBRARY_PATH}

然后使修改生效:source /root/.profile


../gcc-4.4.7/configure --target=i386-rtems4.10 --with-gnu-as --with-gnu-ld --with-newlib --verbose --enable-threads --enable-languages="c,c++" --prefix=/opt/rtems-4.10 --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr

make all(编译时间比较长,请耐心等待)

make info


make install

7编译rtems源码包:

从官网下载rtems-4.10源码包;

然后:

tar jxvf rtems-4.10.2.tar.bz2

mkdir build-rtems

cd build-rtems

../rtems-4.10.2/configure --target=i386-rtems4.10 --enable-posix --enable-networking --enable-cxx --enable-rtemsbsp=pc386 --prefix=/opt/rtems-4.10/

make all install


如果编译rtems没有出现错误,则说明工具链安装成功!

linux
相关资讯       RTEMS  RTEMS开发环境 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款