工具链和库
当我们编译工具链时,我们需要指定使用哪个库来编译工具链。例如,我最近为 openRISC 架构编译了工具链。他们给了我一个选择:uClibc 和 newlib。
是否需要用库来编译工具链?在处理嵌入式Linux时,我不能只在目标平台上编译一个库,然后使用工具链(不带库编译)并将库与用户程序链接起来吗?谢谢你!
When we compile a toolchain, we need to specify which library we are using to compile the toolchain. For example, i recently compiled toolchain for openRISC architecture. They gave me an option to choose from uClibc and newlib.
Is it necessary to compile a toolchain with a library? While working on say embedded linux, cant i just compile a library on the target platform, and the use the toolchain (compiled without the library) and link the library with the user program ? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,是的,我们必须指定 c 库才能构建工具链。就像 uClibc 主要用于微控制器(后来用于处理器)一样,musl libc 用于小于 32MB 的大小(用于较小的内存),glibc 用于大内存但不太可配置。 glibc 非常适合( POSIX 兼容)。此外,您在构建工具链时还需要照顾其他支持库(是否兼容 POSIX)等。
well , yes we have to specify the c library in order to build a toolchain . Like uClibc is mainly for micro controller ( later for processors ) , musl libc is for less than 32MB of size ( for smaller memory ) , glibc is for large memory but not very configurable . glibc is for wildly ( POSIX compatible). Also you have take care of other supporting libraries while building toolchain ( whether POSIX compatibility) etc.
当然,有必要用库来编译工具链。为了减少搜索并变得更加方便。如今每个人都想要一切,如果他们不能立即得到它,他们会很恼火,但我们有时应该学习如何变得有用和富有成效。库和工具链非常重要。
Of coarse it is necessary to compile a toolchain with a library. In order to lessen the search and become more convenient. Everybody wants everything so quickly nowadays if they dont get it straight away they get annoyed but we should learn how to become useful and productive sometimes. Libraries and toolchain are very important.