当前位置: 代码迷 >> 驱动开发 >> 构建TOOLCHAIN时编译GCC失误
  详细解决方案

构建TOOLCHAIN时编译GCC失误

热度:28   发布时间:2016-04-28 10:44:16.0
构建TOOLCHAIN时编译GCC出错
-fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fpic -I. -I. -I../.././gcc -I../../../gcc-4.7.0/libgcc -I../../../gcc-4.7.0/libgcc/. -I../../../gcc-4.7.0/libgcc/../gcc -I../../../gcc-4.7.0/libgcc/../include -DHAVE_CC_TLS -DUSE_TLS -o _fixunssfsi.o -MT _fixunssfsi.o -MD -MP -MF _fixunssfsi.dep -DL_fixunssfsi -c ../../../gcc-4.7.0/libgcc/libgcc2.c 
In file included from /usr/include/limits.h:27:0,
  from /maxwit/build/toolchain/gcc-4.7.0-build1/./gcc/include-fixed/limits.h:169,
  from /maxwit/build/toolchain/gcc-4.7.0-build1/./gcc/include-fixed/syslimits.h:7,
  from /maxwit/build/toolchain/gcc-4.7.0-build1/./gcc/include-fixed/limits.h:34,
  from ../../../gcc-4.7.0/libgcc/libgcc2.c:1733:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make[3]: *** [_fixunssfsi.o] 错误 1
make[3]:正在离开目录 `/maxwit/build/toolchain/gcc-4.7.0-build1/i686-pc-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] 错误 2
make[2]:正在离开目录 `/maxwit/build/toolchain/gcc-4.7.0-build1'
make[1]: *** [stage1-bubble] 错误 2
make[1]:正在离开目录 `/maxwit/build/toolchain/gcc-4.7.0-build1'
make: *** [all] 错误 2

构建TOOLCHAIN时编译GCC出错,但我在另外一台机器上编译通过。是不是我的什么依赖关系还没建好啊。我能想到的全更新了

付编译脚本
../gcc-4.7.0/configure \
  --prefix=/usr \
  --build=${BUILD_PLAT} \
  --host=${BUILD_PLAT} \
  --target=${TARGET_PLAT} \
  --with-sysroot=${ROOTFS_PATH} \
  --without-headers \
  --with-newlib \
  --disable-libada \
  --disable-multilib \
  --disable-nls \
  --disable-decimal-float \
  --disable-libgomp \
  --disable-libmudflap \
  --disable-libssp \
  --disable-shared \
  --disable-threads \
  --enable-long-long \
  --enable-languages=c \
  --disable-libquadmath \
  --disable-libquadmath-support \
  ${GCC_CPU_OPT} \
  || exit 1

make && \
make DESTDIR=${TOOLCHAIN_PATH} install || exit 1




------解决方案--------------------
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
环境还是没弄好吧