summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-02-03 19:13:42 +0000
committerdavidovski <david@davidovski.xyz>2022-02-03 19:13:42 +0000
commit0b0913a10d6714015f1d1afa1a737086e20bac41 (patch)
tree19a8ceff7a481409a4f798d31760250a4f11307f
parent5990aa2c3bc06c92cd1fa97104d66c58f29735c9 (diff)
fixed maketools
-rwxr-xr-xsrc/make_tools.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/make_tools.sh b/src/make_tools.sh
index db8ffb4..e55e3d6 100755
--- a/src/make_tools.sh
+++ b/src/make_tools.sh
@@ -15,6 +15,10 @@ TGT=$(uname -m)-xi-linux-gnu
export PATH=/usr/bin
if [ ! -L /bin ]; then export PATH=/bin:$PATH; fi
export PATH=$SYSTEM_DIR/tools/bin:$PATH
+export CONFIG_SITE=$SYSTEM_DIR/usr/share/config.site
+export LC_ALL=POSIX
+
+
packages=(binutils gcc linux glibc mpfr gmp mpc m4 ncurses bash coreutils diffutils file findutils gawk grep gzip make patch sed tar xz)
@@ -60,7 +64,7 @@ extract () {
make_dir_struct() {
local system=$1
- mkdir -pv $system/{etc,var,proc,sys,run,tmp} $system/usr/{bin,lib,sbin} $system/bin/{pts,shm}
+ mkdir -pv $system/{etc,var,proc,sys,run,tmp} $system/usr/{bin,lib,sbin} $system/dev/{pts,shm}
for i in bin lib sbin; do
ln -sv usr/$i $system/$i
@@ -162,6 +166,8 @@ build_gcc1() {
#rm -rf mpfr gmp mpc
+ autoreconf -i
+
[ -d mpfr ] || cp -r $SOURCES/mpfr mpfr
[ -d gmp ] || cp -r $SOURCES/gmp gmp
[ -d mpc ] || cp -r $SOURCES/mpc mpc
@@ -520,6 +526,11 @@ reset_before_build () {
cd $SYSTEM_DIR; printf "\033[0;34mbuilding $1...\033[0m"
}
+for package in ${packages[@]}; do
+ cd $SYSTEM_DIR
+ touch $package.build.log
+done
+
reset_before_build "binutils1"
build_binutils1 &> binutils.build.log && printf "passed\n" || exit 1
@@ -536,7 +547,7 @@ reset_before_build "libstdcxx"
build_libstdcxx &> libstdcxx.build.log && printf "\033[0;32mpassed\n" || exit 1
reset_before_build "m4"
-build_m4 && printf "\033[0;32mpassed\n" || exit 1
+build_m4 &> m4.build.log && printf "\033[0;32mpassed\n" || exit 1
reset_before_build "ncurses"
build_ncurses &> ncurses.build.log && printf "\033[0;32mpassed\n" || exit 1