|
|

楼主 |
发表于 2007-2-16 09:08:50
|
显示全部楼层
我又重复来了一次以便详细记录
1、查看gcc和patch- lfs@gentoo /app/sources $ ll |grep gcc
- -rw-r--r-- 1 lfs root 14802 Feb 15 14:02 gcc-4.0.3-specs-1.patch
- -rw-r--r-- 1 lfs root 32980638 Feb 15 14:02 gcc-4.0.3.tar.bz2
- -rw-r--r-- 1 lfs root 1295 Feb 15 14:02 inetutils-1.4.2-gcc4_fixes-3.patch
- -rw-r--r-- 1 lfs root 1440 Feb 15 14:02 kbd-1.12-gcc4_fixes-1.patch
- -rw-r--r-- 1 lfs root 1228 Feb 15 14:02 tar-1.15.1-gcc4_fix_tests-1.patch
复制代码 2、把gcc-4.0.3解开并打patch- lfs@gentoo /app/sources $ tar xvf gcc-4.0.3.tar.bz2 >/dev/null
- lfs@gentoo /app/sources $ cd gcc-4.0.3
- lfs@gentoo /app/sources/gcc-4.0.3 $ patch -Np1 -i ../gcc-4.0.3-specs-1.patch
- patching file gcc/config/alpha/linux-elf.h
- patching file gcc/config/arm/linux-elf.h
- Hunk #1 succeeded at 88 (offset 1 line).
- patching file gcc/config/frv/linux.h
- patching file gcc/config/i386/gnu.h
- patching file gcc/config/i386/linux.h
- patching file gcc/config/i386/linux64.h
- patching file gcc/config/ia64/linux.h
- patching file gcc/config/linux.h
- patching file gcc/config/m32r/linux.h
- patching file gcc/config/m68k/linux.h
- patching file gcc/config/mips/linux.h
- patching file gcc/config/mips/linux64.h
- Hunk #1 succeeded at 47 (offset -13 lines).
- patching file gcc/config/mn10300/linux.h
- Hunk #1 succeeded at 37 with fuzz 1.
- patching file gcc/config/pa/pa-linux.h
- patching file gcc/config/rs6000/linux64.h
- Hunk #1 succeeded at 355 (offset 4 lines).
- patching file gcc/config/rs6000/sysv4.h
- Hunk #1 succeeded at 1125 (offset -6 lines).
- Hunk #2 succeeded at 1156 (offset -6 lines).
- patching file gcc/config/s390/linux.h
- patching file gcc/config/sh/linux.h
- Hunk #1 succeeded at 71 (offset 1 line).
- patching file gcc/config/sparc/linux.h
- patching file gcc/config/sparc/linux64.h
- patching file gcc/config/xtensa/linux.h
复制代码 3、开始编译gcc-4.0.3(路径确认没有错误)- lfs@gentoo /app/sources/gcc-4.0.3 $ mkdir ../gcc-build
- lfs@gentoo /app/sources/gcc-4.0.3 $ cd ../gcc-build/
- lfs@gentoo /app/sources/gcc-build $ ../gcc-4.0.3/configure --prefix=/tools --libexecdir=/tools/lib \
- > --with-local-prefix=/tools --disable-nls \
- > --enable-shared --enable-languages=c
复制代码 4、报错如下:- In file included from ../../gcc-4.0.3/gcc/tsystem.h:90,
- from ../../gcc-4.0.3/gcc/crtstuff.c:64:
- ./include/stdio.h:22:42: error: gentoo-multilib/amd64/stdio.h: No such file or directory
- In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
- ../../gcc-4.0.3/gcc/tsystem.h:93:23: error: sys/types.h: No such file or directory
- ../../gcc-4.0.3/gcc/tsystem.h:96:19: error: errno.h: No such file or directory
- ../../gcc-4.0.3/gcc/tsystem.h:103:20: error: string.h: No such file or directory
- ../../gcc-4.0.3/gcc/tsystem.h:104:20: error: stdlib.h: No such file or directory
- ../../gcc-4.0.3/gcc/tsystem.h:105:20: error: unistd.h: No such file or directory
- In file included from ./include/syslimits.h:7,
- from ./include/limits.h:11,
- from ../../gcc-4.0.3/gcc/tsystem.h:108,
- from ../../gcc-4.0.3/gcc/crtstuff.c:64:
- ./include/limits.h:122:61: error: limits.h: No such file or directory
- In file included from ../../gcc-4.0.3/gcc/crtstuff.c:64:
- ../../gcc-4.0.3/gcc/tsystem.h:111:18: error: time.h: No such file or directory
- make[2]: *** [crtbegin.o] Error 1
- make[1]: *** [stage1_build] Error 2
- make: *** [bootstrap] Error 2
复制代码 patch的问题我上http://www.linuxfromscratch.org/patches/lfs/6.2/确认了,确实没有问题,谢谢楼上的回答,同时也希望其他朋友能提供帮助。 |
|