From 5e6f60629559c327b29f839d1b25dbcb4f0cce05 Mon Sep 17 00:00:00 2001 From: Giacomo Tesio Date: Thu, 18 May 2017 03:27:20 +0200 Subject: [PATCH] travis-ci: hide GCC & newlib output on success --- cross/init.sh | 35 +++++++++++++++++++++++++++-------- cross/pkgs/newlib.sh | 19 ++++++++++++++++++- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/cross/init.sh b/cross/init.sh index 4d9c5eb..c3afa94 100755 --- a/cross/init.sh +++ b/cross/init.sh @@ -32,8 +32,20 @@ usyscalls header $JEHANNE/sys/src/sysconf.json > $JEHANNE/arch/amd64/include/sys # create a GCC crosscompiler in Debian without requiring root access or Tex. # And this despite the extreme quality of Debian GNU/Linux! +echo -n Building cross toolchain. +( + # Inside parentheses, and therefore a subshell . . . + while [ 1 ] # Endless loop. + do + echo -n "." + sleep 3 + done +) & +dotter=$! +date > cross-toolchain.build.log + # fetch all sources -(cd src && fetch) +(cd src && fetch) >> cross-toolchain.build.log 2>&1 # To create a Jehanne version of GCC, we need specific OUTDATED versions # of Autotools that won't compile easily in a modern Linux distro. @@ -43,11 +55,14 @@ function failOnError { # $2 -> task description if [ $1 -ne 0 ]; then echo "ERROR $2" + echo + echo BUILD LOG: + echo + cat cross-toolchain.build.log exit $1 fi } - # build m4 1.4.14 # - workaround a bug in lib/stdio.in.h, see http://lists.gnu.org/archive/html/bug-m4/2012-08/msg00008.html # - workaround a bug in src/m4.h, see https://bugs.archlinux.org/task/19829 @@ -59,7 +74,7 @@ if [ ! -f tmp/bin/m4 ]; then ( grep -q '#include ' src/m4.h || sed -i 's:.*\#include .*:&\n#include :g' src/m4.h ) && ./configure --prefix=$JEHANNE/hacking/cross/tmp && make && make install -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building m4" fi # build autoconf 2.64 @@ -76,7 +91,7 @@ if [ ! -f tmp/bin/autoconf ]; then cp ../../patch/MakeNothing.in ../autoconf/doc/Makefile.in && cp ../../patch/MakeNothing.in ../autoconf/man/Makefile.in && make && make install -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building autoconf" fi # build automake 1.11.1 @@ -96,7 +111,7 @@ if [ ! -f tmp/bin/automake ]; then cp ../../patch/MakeNothing.in doc/Makefile.in && cp ../../patch/MakeNothing.in tests/Makefile.in && make && make install -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building automake" fi # build libtool 2.4 @@ -105,7 +120,7 @@ if [ ! -f tmp/bin/libtool ]; then cd src/libtool && ./configure --prefix=$JEHANNE/hacking/cross/tmp && make && make install -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building libtool" fi @@ -156,7 +171,7 @@ if [ ! -f toolchain/bin/x86_64-jehanne-ar ]; then cp $CROSS_DIR/patch/MakeNothing.in $CROSS_DIR/src/binutils/binutils/doc/Makefile && make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true && make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true install -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building binutils" fi @@ -188,8 +203,12 @@ fi # && # make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true all-target-libstdc++-v3 && # make MAKEINFO=true MAKEINFOHTML=true TEXI2DVI=true TEXI2PDF=true DVIPS=true install-target-libstdc++-v3 -) +) >> cross-toolchain.build.log 2>&1 failOnError $? "building gcc" # add sh ln -sf /bin/bash $JEHANNE/hacking/cross/toolchain/bin/x86_64-jehanne-sh + +kill $dotter +wait $dotter 2>/dev/null + diff --git a/cross/pkgs/newlib.sh b/cross/pkgs/newlib.sh index a7245a9..a1aeeca 100755 --- a/cross/pkgs/newlib.sh +++ b/cross/pkgs/newlib.sh @@ -31,9 +31,22 @@ export NEWLIB_SRC=$NEWLIB/src/ export NEWLIB_BUILD=$NEWLIB/build/ export NEWLIB_PREFIX=$NEWLIB/output/ +echo -n Building newlib. +( + # Inside parentheses, and therefore a subshell . . . + while [ 1 ] # Endless loop. + do + echo -n "." + sleep 3 + done +) & +dotter=$! + function failOnError { # $1 -> exit status on a previous command # $2 -> task description + kill $dotter + wait $dotter 2>/dev/null if [ $1 -ne 0 ]; then echo "ERROR $2" if [ "$TRAVIS_BUILD_DIR" != "" ]; then @@ -41,6 +54,7 @@ function failOnError { echo "CONFIG.LOG @ $NEWLIB_BUILD/config.log" echo cat $NEWLIB_BUILD/config.log + cat newlib.build.log fi exit $1 fi @@ -70,5 +84,8 @@ export CFLAGS_FOR_TARGET="-g -gdwarf-2 -ggdb -O$NEWLIB_OPTIMIZATION" echo "Newlib headers installed at $JEHANNE/sys/posix/newlib/" && mv $NEWLIB_PREFIX/x86_64-jehanne/lib/ $JEHANNE/arch/amd64/lib/newlib/ && echo "Newlib libraries installed at $JEHANNE/arch/amd64/lib/newlib/" -) +) >> newlib.build.log failOnError $? "building newlib" + +kill $dotter +wait $dotter 2>/dev/null