file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.25, not stripped
readelf -l a.out |grep Requesting
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
rm dummy.c a.out
以后,虽然gcc还在/tools目录下,但它会使用/lib64下的加载器和库,己要开始逐步从/tools下分离了。
第5节 编译安装bintuils 32位
命令如下:
tar xvfj ../binutils-2.21.1a.tar.bz2
mkdir binutils-build-p1-i686
cd binutils-build-p1-i686
CFLAGS+='-mstackrealign -fPIC -O3' ../binutils-2.21.1/configure \
--target=$WOLF32_TGT --prefix=/tools \
--disable-nls --disable-werror --libdir=/tools/lib32
查看一下config.log,
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET='i686-wolf-linux-gnu-cc'
GCC_FOR_TARGET='i686-wolf-linux-gnu-gcc'
configure:4268: checking whether we are cross compiling
configure:4270: result: no
gcc -v
Reading specs from /tools/lib64/gcc/x86_64-wolf-linux-gnu/4.6.1/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tools/libexec/gcc/x86_64-wolf-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-wolf-linux-gnu
Configured with: ../gcc-4.6.1-p2/configure --prefix=/tools --libdir=/tools/lib64 --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp --without-ppl --without-cloog --with-mpfr-include=/home/lfs/build/sources/build1/gcc-build-p2-x86_64/../gcc-4.6.1-p2/mpfr/src --enable-initfini-array --with-mpfr-lib=/home/lfs/build/sources/build1/gcc-build-p2-x86_64/mpfr/src/.libs --with-headers=/tools/include --with-libs=/tools/lib64 --target=x86_64-wolf-linux-gnu