标签:
1. gcc需要的一些lib
GMP:A free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers.
MPFR:Multiple Precision Floating-Point Reliable Library.
MPC:A C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result.
2.GMP/MPFR/MPC的源代码目录都放到gcc目录下作为其子目录存在,去除目录版本号
3. lfs文档说需要修改下gcc源代码,不太能看懂到底做了些什么,大概是将gcc默认使用的一些目录比如lib之类的修改为sources/lib(?)
4. 建立一个不带版本号的gcc链接到gcc-ver.ver.ver,方便执行修改gcc源代码的那个script
5. 在gcc目录下执行下上面说的script。
注意:上述scipt在gcc目录下执行!若执行成功会有一系列文件改名提示出来。
粗看起来script在sources/gcc/config目录下找东西,但实际上gcc源代码目录下有一个gcc/config目录(sources/gcc-v.v.v/gcc/config),所以step4是不需要的。
6.  ../configure \
 --target=$LFS_TGT \
 --prefix=/tools \
  --with-glibc-version=2.11 \
   --with-sysroot=$LFS \
   --with-newlib --without-headers \
  --with-local-prefix=/tools \
  --with-native-system-header-dir=/tools/include \
  --disable-nls \
  --disable-shared  \
  --disable-multilib \
  --disable-decimal-float \
  --disable-threads \
  --disable-libatomic \
  --disable-libgomp \
  --disable-libquadmath \
  --disable-libssp \
  --disable-libvtv \
  --disable-libstdcxx \
  --enable-languages=c,c++
标签:
原文地址:http://www.cnblogs.com/byeyear/p/5400644.html