手斧Linux – 从LFS到Funtoo (61)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值