如何重建 GNU Arm Embedded Toolchain 的 newlib 和 newlib-nano [英] How to rebuild newlib and newlib-nano of GNU Arm Embedded Toolchain

查看:109
本文介绍了如何重建 GNU Arm Embedded Toolchain 的 newlib 和 newlib-nano的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从 https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads 并将其安装在我的 Windows 10 PC 上.

I downloaded the toolchain "gcc-arm-none-eabi-6-2017-q2-update-win32-sha1.exe" (Windows) from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and installed it on my Windows 10 PC.

安装文件夹在../share/doc/gcc-arm-none-eabi/"中包含一个release.txt,它告诉:

The installation folder contains a release.txt in "../share/doc/gcc-arm-none-eabi/" which tells:

此版本包括以下项目:

  • newlib 和 newlib-nano :git://sourceware.org/git/newlib-cygwin.git 提交 0d79b021a4ec4e6b9aa1a9f6db0e29a137005ce7

还有../share/doc/gcc-arm-none-eabi/"中的 readme.txt 包含:

And also the readme.txt in "../share/doc/gcc-arm-none-eabi/" contains:

  • C 库使用 *

此工具链发布时带有两个预构建的 C 库,基于newlib:一个是标准的 newlib (libc.a),另一个是代码大小的 newlib-nano (libc_nano.a).

This toolchain is released with two prebuilt C libraries based on newlib: one is the standard newlib (libc.a) and the other is newlib-nano (libc_nano.a) for code size.

现在我想要完全重建包含在../arm-none-eabi/lib/thumb"中的所有 libc.a 和 libc_nano.a

Now I want exactly rebuild all the libc.a and libc_nano.a contained in "../arm-none-eabi/lib/thumb"

目前我可以使用gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2"在 Ubuntu 上构建

At the moment I can build on Ubuntu with "gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2"

$ # Downloaded newlib-cygwin (with corresponding hash) into folder newlib-cygwin
$ mkdir build
$ cd build
$ ../newlib-cygwin/configure --target=arm-none-eabi --disable-newlib-supplied-syscalls
$ make

我必须如何配置 newlib 以构建 gcc-arm-none-eabi-6-2017-q2-update-linux.tar 中包含的 libc.a 和 libc_nano.a 的精确副本.bz2?

$ # Downloaded newlib-cygwin (with corresponding hash) into folder newlib-cygwin
$ mkdir build
$ cd build
$ ../newlib-cygwin/configure --target=arm-none-eabi --???
$ make

推荐答案

如果我没理解错,更详细的问题是:
GNU Arm 嵌入式工具链"开发人员在构建 gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 存档中提供的 newlib 库时使用了哪些配置选项?
这些用于 newlib:

If i understand you correctly, a more detailed question is:
What configure options did 'GNU Arm Embedded Toolchain' developers used when building newlib libraries shipped in gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 archive?
These ones for newlib:

--target=arm-none-eabi --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-提供的系统调用 --disable-nls

还有这些用于 newlib-nano 的:

And these ones for newlib-nano:

--target=arm-none-eabi --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io--disable-nls

我是怎么得到的?让我们来看看这个过程:
这些软件包建立在 launchpad 之上,您可以从中找到所有 构建 发生在 lanuchpad 上.我选择了 gcc-arm-none-eabi 6-2017q2-1 从 2017-10-24.在那里我可以找到 构建日志.我用 | 搜索了构建日志grep "^+ " |grep "配置" |grep 'src/newlib' 而我只剩下:

How I got it? Let's walk through the process:
These packages are build on launchpad, where from you find all the builds that took place on lanuchpad. I picked gcc-arm-none-eabi 6-2017q2-1 from 2017-10-24. There i can find the buildlog. I grepped the buildlog with | grep "^+ " | grep "configure " | grep 'src/newlib' and i was left with:

+/<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<<PKGBUILDDIR>>/install-native --infodir=/<<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/<<PKGBUILDIR>>/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-锁定 --disable-newlib-supplied-syscalls --disable-nls+/<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/build-native/target-libs --disable-newlib-supplied-syscalls --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls

一些福尔摩斯和我推断第二行是 newlib 配置为构建为 newlib-nano (--enable-newlib-reent-small),第一行是配置为构建的 newlib作为完整的新库.
要回答您的主题问题,以相同的方式重新编译 newlib 和 newlib-nano 将我上面发布的选项传递给 newlib ./configure 脚本.

A bit of Sherlock Holmes and i deduced that the second line is newlib configured to build as newlib-nano (--enable-newlib-reent-small), the first is newlib configured to build as full newlib.
To answer your topic question, to recompile newlib and newlib-nano the same way pass the options I have posted above to newlib ./configure script.

这篇关于如何重建 GNU Arm Embedded Toolchain 的 newlib 和 newlib-nano的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆