2024-10-02 07:23:18 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-10-06 06:16:22 +08:00
|
|
|
source ../versions.sh
|
2024-10-02 07:23:18 +08:00
|
|
|
|
|
|
|
GLSOURCES="${LFS}/sources"
|
|
|
|
|
|
|
|
if [ "`whoami`" != "lfs" ]; then
|
|
|
|
myfail "Must run this script as lfs user"
|
|
|
|
fi
|
|
|
|
|
2024-10-08 15:48:40 +08:00
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
2024-10-02 07:23:18 +08:00
|
|
|
|
2024-10-04 01:04:58 +08:00
|
|
|
[ -d binutils-${binutils_version} ] && rm -rf binutils-${binutils_version}
|
|
|
|
|
2024-10-02 07:23:18 +08:00
|
|
|
tar -Jxf ${binutils_tarball}
|
|
|
|
cd binutils-${binutils_version}
|
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
|
|
|
|
../configure --prefix=${LFS}/tools \
|
|
|
|
--with-sysroot=${LFS} \
|
|
|
|
--target=${LFS_TGT} \
|
|
|
|
--disable-nls \
|
|
|
|
--enable-gprofng=no \
|
|
|
|
--disable-werror \
|
|
|
|
--enable-new-dtags \
|
|
|
|
--enable-default-hash-style=gnu
|
|
|
|
|
|
|
|
make
|
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed building binutils pass 1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
make install
|
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
myfail "Failed installing binutils pass 1"
|
|
|
|
fi
|
2024-10-08 15:48:40 +08:00
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
|
|
|
|
pushd ${GLSOURCES}
|
|
|
|
|
|
|
|
rm -rf binutils-${binutils_version}
|
|
|
|
|
|
|
|
popd
|