这篇文章写的真的很不错!
对于嵌入式开发者,newlib并不陌生,Newlib是一个面向嵌入式系统的C运行库。最初是由Cygnus Solutions收集组装的一个源代码集合,取名为newlib,现在由Red Hat维护。
newlib官网:https://sourceware.org/newlib/
git 下载:git clone git://sourceware.org/git/newlib-cygwin.git
如何编译newlib:
newlib需要autoconf, automake,等工具,因此要先安装这些工具。
$ cd newlib-cygwin
$export PATH=/home/aditya/development/rtems/4.12/bin:$PATH
export是将这些工具的路径写入系统路径中
然后退出newlib的文件夹,新建一个文件夹用于存放编译后的文件
$ mkdir b-sparc-rtems4.12-newlib
$ cd b-sparc-rtems4.12-newlib
$ ../newlib-cygwin/configure --target=sparc-rtems4.12 --disable-shared --disable-nls --enable-werror --enable-newlib-supplied-syscalls --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --prefix=/home/aditya/development/rtems4.12/tools
$ make all
$ sudo PATH=/home/aditya/development/rtems/4.12/bin:${PATH} make install
以上命令能够生成.o文件,表示编译成功。
---------------------
作者:hahachenchen789
来源:优快云
原文:https://blog.youkuaiyun.com/hahachenchen789/article/details/77603468
版权声明:本文为博主原创文章,转载请附上博文链接!