summaryrefslogtreecommitdiff
path: root/5-build-newlib.sh
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2022-06-18 19:35:55 +0300
committerOxore <oxore@protonmail.com>2022-06-18 19:35:55 +0300
commit5cddfc7214117a2a8e5c4a11429a33dde50edd19 (patch)
treec67bd4ac20c3ae30e8186c957261fb6fde19ffc9 /5-build-newlib.sh
parentb875d19191f659f88b8c43a7f08bf6df740b07c7 (diff)
Finally a working compiler with newlib
Diffstat (limited to '5-build-newlib.sh')
-rw-r--r--5-build-newlib.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/5-build-newlib.sh b/5-build-newlib.sh
index 5c4429b..ddbc704 100644
--- a/5-build-newlib.sh
+++ b/5-build-newlib.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-set -e
source ./common
export PATH="$prefix_dir/bin:${PATH:+:${PATH}}"
@@ -7,11 +6,14 @@ mkdir -p build/newlib-$newlib_ver
cd build/newlib-$newlib_ver
echo "Configuring newlib-${newlib_ver}"
../../unpacked/newlib-$newlib_ver/configure --prefix=$prefix_dir --target=$target >configure.log 2>&1
-if [ ! $? ]; then less configure.log; exit; fi
+ret=$?
+if [ $ret -ne 0 ]; then less configure.log; exit 1; fi
echo "Building newlib-$newlib_ver"
make -j$jobs >build.log 2>&1
-if [ ! $? ]; then less build.log; exit; fi
+ret=$?
+if [ $ret -ne 0 ]; then less build.log; exit 1; fi
echo "Installing newlib-$newlib_ver"
make install >install.log 2>&1
-if [ ! $? ]; then less install.log; exit; fi
+ret=$?
+if [ $ret -ne 0 ]; then less install.log; exit 1; fi
echo "Done with newlib-$newlib_ver"