+ -
当前位置:首页 → 问答吧 → 制作交叉编译工具失败

制作交叉编译工具失败

时间:2008-07-08

来源:互联网

按照CLFS手册制作交叉编译工具, 在编译GLIBC时出现如下问题(第一次编译binutils与gcc都成功能过):

lfs:/lfs/sources/glibc-build$ make
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.4 objdir=`pwd` all
make[1]: Entering directory `/lfs/sources/glibc-2.4'
make[1]: *** No rule to make target `all'. Stop.
make[1]: Leaving directory `/lfs/sources/glibc-2.4'
make: *** [all] Error 2

google 搜了好久也没查到, 不知道是什么原因

configure配置也成功通过,具体参数如下:

BUILD_CC="gcc" CC="${LFS_TARGET}-gcc" \
AR="${LFS_TARGET}-ar" RANLIB="${LFS_TARGET}-ranlib" \
../glibc-2.4/configure --prefix=/tools \
--host=${LFS_TARGET} --build=${LFS_HOST} \
--disable-profile --enable-add-ons \
--with-tls --enable-kernel=2.6.0 --with-__thread \
--with-binutils=/cross-tools/bin --with-headers=/tools/include \
--cache-file=config.cache




生成的makefile如下:

srcdir = ../glibc-2.4

# Uncomment the line below if you want to do parallel build.
# PARALLELMFLAGS = -j 4

# This option is for those who modify the sources and keep them in a
# CVS repository. Sometimes it is necessary to pass options to the cvs
# program (not the command), like -z9 or -x.
# CVSOPTS = -z9

all .DEFAULT:
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@

install:
LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@

作者: rollin7   发布时间: 2008-07-08

问题已经解决,原来是glibc-ports目录没放对,另外,按照新版clfs-sysroot来制作的话更简单

作者: rollin7   发布时间: 2008-07-10