mirror of
https://github.com/YellowJacketLinux/lfs-buildscripts.git
synced 2025-02-03 07:17:18 +08:00
toolchain work
This commit is contained in:
parent
66d4fbca5f
commit
60399cc8ca
44
CH05.01-binutils-pass1.sh
Normal file
44
CH05.01-binutils-pass1.sh
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="${LFS}/sources"
|
||||||
|
|
||||||
|
function myfail {
|
||||||
|
echo "$1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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}"
|
||||||
|
|
||||||
|
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
|
66
CH05.02-gcc-pass1.sh
Normal file
66
CH05.02-gcc-pass1.sh
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# FIXME - go and objc
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="${LFS}/sources"
|
||||||
|
|
||||||
|
function myfail {
|
||||||
|
echo "$1"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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}"
|
||||||
|
|
||||||
|
tar -Jxf ${gcc_tarball}
|
||||||
|
cd gcc-${gcc_version}
|
||||||
|
|
||||||
|
tar -xf ../${mpfr_tarball}
|
||||||
|
mv mpfr-${mpfr_version} mpfr
|
||||||
|
tar -xf ../${gmp_tarball}
|
||||||
|
mv gmp-${gmp_version} gmp
|
||||||
|
tar -xf ../${mpc_tarball}
|
||||||
|
mv mpc-${mpc_version} mpc
|
||||||
|
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
|
||||||
|
../configure \
|
||||||
|
--target=${LFS_TGT} \
|
||||||
|
--prefix=${LFS}/tools \
|
||||||
|
--with-glibc-version=2.40 \
|
||||||
|
--with-sysroot=${LFS} \
|
||||||
|
--with-newlib \
|
||||||
|
--without-headers \
|
||||||
|
--enable-default-pie \
|
||||||
|
--enable-default-ssp \
|
||||||
|
--disable-nls \
|
||||||
|
--disable-shared \
|
||||||
|
--disable-multilib \
|
||||||
|
--disable-threads \
|
||||||
|
--disable-libatomic \
|
||||||
|
--disable-libgomp \
|
||||||
|
--disable-libquadmath \
|
||||||
|
--disable-libssp \
|
||||||
|
--disable-libvtv \
|
||||||
|
--disable-libstdcxx \
|
||||||
|
--enable-languages=c,c++
|
||||||
|
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed building gcc pass 1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed installing gcc pass 1"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user