手斧Linux – 从LFS到Funtoo (59)

mkdir -v glibc-build-64

cd glibc-build-64

echo "install_root = $(pwd)/img" >configparms

echo "CFLAGS += -mtune=native -O3 -pipe" >> configparms

../glibc-2.14.1/configure \

    --host=$WOLF64_TGT \

    --prefix=/usr --libexecdir=/usr/lib64/glibc \

    --libdir=/usr/lib64 \

    --enable-add-ons \

    --enable-kernel=2.6.30 \

    --with-headers=/usr/include \

    --enable-multi-arch \

    --with-tls --with-__thread \

    libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes \

    libc_cv_slibdir=/lib64

查看config.log,应是native方式的编译,build和host相同--build=$WOLF64_TGT 。

BUILD_CC='gcc'

CC='x86_64-wolf-linux-gnu-gcc'

cross_compiling='maybe'

看看gcc到底是谁?!

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

Thread model: posix

gcc version 4.6.1 (GCC) 

CC和BUILD_CC都是指向前一章在完成的位于/tools下的x86_64-wolf-linux-gnu,正是希望的。

开始编译:

make 2>&1 |tee out.make

mkdir -pv img/etc

touch img/etc/ld.so.conf

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值