为arm交叉编译glibc
美好的一天
目前,我正在开发一个基于arm-linux的嵌入式设备。我想使用 Glibc 为我的目标架构构建 GCC。 GCC 构建成功,但 Glibc 构建遇到问题。
我使用最新版本的 Glibc (ftp.gnu.org/gnu/glibc/glibc-2.12.1.tar.gz) 及其端口 (ftp.gnu.org/gnu/glibc/glibc-ports-2.12.1 .tar.gz)
我的配置行:
../../glibc-2.12.1/configure --host=arm-none-linux-gnueabi --prefix=/home/anatoly/Desktop/ARM/build/glibc-build --enable-add -ons --with-binutils=/home/anatoly/Destop/ARM/toolchain/arm/bin/
配置脚本工作正常,但我收到一些编译错误:
... /home/anatoly/Desktop/ARM/src/glibc-2.12.1/malloc/libmemusage_pic.a(memusage.os):在函数
me' 中: /home/anatoly/Desktop/ARM/src/glibc-2.12.1/malloc/lmemusage.c:253:未定义引用
__eabi+read_tp' ...
我也尝试使用旧版本(2.11,2.10)但有相同的错误。
有人知道这个问题的解决方案吗?
Good day
Currently, I'm working on an embedded device based on arm-linux. I want to build GCC for my target architecture with Glibc. GCC builds successful, but I have trouble with Glibc build.
I use the latest version of Glibc (ftp.gnu.org/gnu/glibc/glibc-2.12.1.tar.gz) and port for them (ftp.gnu.org/gnu/glibc/glibc-ports-2.12.1.tar.gz)
my configuration line:
../../glibc-2.12.1/configure --host=arm-none-linux-gnueabi --prefix=/home/anatoly/Desktop/ARM/build/glibc-build --enable-add-ons --with-binutils=/home/anatoly/Desctop/ARM/toolchain/arm/bin/
configuration script work fine, but i get some compile error:
...
/home/anatoly/Desktop/ARM/src/glibc-2.12.1/malloc/libmemusage_pic.a(memusage.os): In functionme':
__eabi+read_tp'
/home/anatoly/Desktop/ARM/src/glibc-2.12.1/malloc/lmemusage.c:253: undefined reference to
...
I also tried using the old version (2.11, 2.10) but have the same error.
Does anybody know the solution for this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用预编译的工具链,例如代码源提供的工具链。
如果你想自己制作、优化(过早的优化是万恶之源),请使用 crosstool-NG ,这是一个专门用于交叉编译工具链构建的工具。
如果您不相信,并且想亲手做所有事情,请在 crosstool-NG 邮件列表上提出您的问题。
Use a precompiled toolchain, like those provided by code sourcery.
If you want to make your own, optimised (premature optimization is the root of all evil), use crosstool-NG, which is a tool dedicated to cross-compilation toolchain building.
If you are not convinced, and want to do everything with your own hands, ask your question on the crosstool-NG mailing list.
尝试用arm-linux-gnueabi 替换arm-none-linux-gnueabi。检查路径上是否存在带有“host”前缀的编译器、加载器等。
Try substituting arm-linux-gnueabi for arm-none-linux-gnueabi. Check that a compiler, loader etc. with the prefix you used for "host" exist on your path.