- 论坛徽章:
- 0
|
目前在做一个任务,升级开发板的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有特殊的配置要求?
|
|