mirror of
https://github.com/YellowJacketLinux/lfs-buildscripts.git
synced 2025-01-23 22:42:28 +08:00
51 lines
838 B
Bash
51 lines
838 B
Bash
#!/bin/bash
|
|
|
|
source ../versions.sh
|
|
|
|
GLSOURCES="${LFS}/sources"
|
|
|
|
if [ "`whoami`" != "lfs" ]; then
|
|
myfail "Must run this script as lfs user"
|
|
fi
|
|
|
|
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
|
|
|
[ -d binutils-${binutils_version} ] && rm -rf binutils-${binutils_version}
|
|
|
|
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
|
|
|
|
popd
|
|
|
|
# cleanup
|
|
|
|
pushd ${GLSOURCES}
|
|
|
|
rm -rf binutils-${binutils_version}
|
|
|
|
popd
|