免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2210 | 回复: 0
打印 上一主题 下一主题

[系统安装] 移植glibc到开发板 出现Illegal instruction错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-10-12 16:17 |只看该作者 |倒序浏览
目前在做一个任务,升级开发板的glibc

编译环境使用的是Fedora-Live-Workstation-i686-23-10,基本信息如下
[user@localhost build]$ uname -a
Linux localhost.localdomain 4.2.3-300.fc23.i686 #1 SMP Mon Oct 5 16:26:47 UTC 2015 i686 i686 i386 GNU/Linux
[user@localhost build]$ gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/5.1.1/lto-wrapper
目标:i686-redhat-linux
gcc 版本 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)
[user@localhost build]$ ldd --version
ldd (GNU libc) 2.22

开发板基本信息
[root@X-Linux]:~ # uname -a
Linux X-Linux 2.6.29.6-140115DX. #3 Wed Oct 28 11:09:24 CST 2015 i586 GNU/Linux
[root@X-Linux]:~ # ldd --version
ldd (GNU libc) 2.10.1
$Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$Written by Roland McGrath and Ulrich Drepper.

编译内核
[user@localhost linux]$ cd linux-4.72
[user@localhost linux-4.7.2]$ make ARCR=x86 menuconfig
[user@localhost linux-4.7.2]$ make ARCH=x86 bzImage
编译内核头文件
[user@localhost linux-4.7.2]$ make INSTALL_HDR_PATH=/home/user/linux/headers/ headers_install
编译glibc
[user@localhost linux-4.7.2]$ cd ../build/
[user@localhost build]$ ../glibc-2.24/configure --prefix=/ --host=i486-linux --disable-profile --with-tls --without-selinux --enable-add-ons --enable-kernel=3.2.0 --with-headers=/home/user/linux/headers/include
[user@localhost build]$make
[user@localhost build]$make install_root=/home/user/linux/install install

将/home/user/linux/install/lib下的所有动态库拷到开发板/lib 目录下
会有Illegal instruction

请教大神是怎么回事?

PS:之前使用Fedora11 编译glibc 2.10.1到2.15(编译更高版本编译器Binutils版本太低报错), 按此法可行。
是编译环境的而原因吗?还是高版本glibc有特殊的配置要求?


您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP