2019-09-28 00:17:56 +08:00
|
|
|
name=binutils
|
2020-06-12 16:42:33 +08:00
|
|
|
version=2.34
|
2019-09-28 00:17:56 +08:00
|
|
|
source=(http://ftp.gnu.org/gnu/binutils/binutils-$version.tar.xz)
|
2018-12-01 00:12:45 +08:00
|
|
|
|
2019-09-28 00:17:56 +08:00
|
|
|
build() {
|
|
|
|
if [ "$MULTILIB" = "yes" ]; then
|
|
|
|
multilibopt="--with-lib-path=/tools/lib:/tools/lib32"
|
|
|
|
else
|
|
|
|
multilibopt="--with-lib-path=/tools/lib"
|
|
|
|
fi
|
2018-12-01 00:12:45 +08:00
|
|
|
|
2019-09-28 00:17:56 +08:00
|
|
|
cd $name-$version
|
2018-12-01 00:12:45 +08:00
|
|
|
|
|
|
|
mkdir -v build
|
|
|
|
cd build
|
|
|
|
|
2019-09-28 00:17:56 +08:00
|
|
|
../configure $multilibopt \
|
|
|
|
--prefix=/tools \
|
|
|
|
--with-sysroot=$LFS \
|
|
|
|
--target=$LFS_TGT \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-werror
|
2018-12-01 00:12:45 +08:00
|
|
|
make
|
2019-09-28 00:17:56 +08:00
|
|
|
mkdir -v /tools/lib && ln -sv lib /tools/lib64
|
|
|
|
[ "$MULTILIB" = "yes" ] && mkdir -p /tools/lib32
|
2018-12-01 00:12:45 +08:00
|
|
|
make install
|
2019-09-28 00:17:56 +08:00
|
|
|
}
|