Skip to content

Commit

Permalink
Dump log file on non-zero exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Jan 12, 2022
1 parent db04b14 commit 6c9a7f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/stage0/install_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ case "$with_cmake" in
fi
echo "Installing from scratch into ${pkg_install_dir}"
mkdir -p ${pkg_install_dir}
/bin/sh cmake-${cmake_ver}-Linux-x86_64.sh --prefix=${pkg_install_dir} --skip-license > install.log 2>&1
/bin/sh cmake-${cmake_ver}-Linux-x86_64.sh --prefix=${pkg_install_dir} --skip-license > install.log 2>&1 || cat install.log
write_checksums "${install_lock_file}" "${SCRIPT_DIR}/stage0/$(basename ${SCRIPT_NAME})"
fi
;;
Expand Down
20 changes: 10 additions & 10 deletions tools/toolchain/scripts/stage0/install_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ case "$with_gcc" in
echo "Installing GCC from scratch into ${pkg_install_dir}"
cd gcc-${gcc_ver}

./contrib/download_prerequisites > prereq.log 2>&1
./contrib/download_prerequisites > prereq.log 2>&1 || cat prereq.log
GCCROOT=${PWD}
mkdir obj
cd obj
Expand All @@ -69,12 +69,12 @@ case "$with_gcc" in
--disable-multilib --disable-bootstrap \
--enable-lto \
--enable-plugins \
> configure.log 2>&1
> configure.log 2>&1 || cat configure.log
make -j $(get_nprocs) \
CFLAGS="-fPIC $CFLAGS" \
CXXFLAGS="-fPIC $CXXFLAGS" \
> make.log 2>&1
make -j $(get_nprocs) install > install.log 2>&1
> make.log 2>&1 || cat make.log
make -j $(get_nprocs) install > install.log 2>&1 || cat install.log
# thread sanitizer
if [ $ENABLE_TSAN = "__TRUE__" ]; then
# now the tricky bit... we need to recompile in particular
Expand All @@ -85,23 +85,23 @@ case "$with_gcc" in
# gcc, tested with 5.1.0 based on
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374#c10
cd x86_64*/libgfortran
make clean > clean.log 2>&1
make clean > clean.log 2>&1 || cat clean.log
make -j $(get_nprocs) \
CFLAGS="-std=gnu99 -g -O2 -fsanitize=thread " \
FCFLAGS="-g -O2 -fsanitize=thread" \
CXXFLAGS="-std=gnu99 -g -O2 -fsanitize=thread " \
LDFLAGS="-B$(pwd)/../libsanitizer/tsan/.libs/ -Wl,-rpath,$(pwd)/../libsanitizer/tsan/.libs/ -fsanitize=thread" \
> make.log 2>&1
make install > install.log 2>&1
> make.log 2>&1 || cat make.log
make install > install.log 2>&1 || cat install.log
cd ../libgomp
make clean > clean.log 2>&1
make clean > clean.log 2>&1 || cat clean.log
make -j $(get_nprocs) \
CFLAGS="-std=gnu99 -g -O2 -fsanitize=thread " \
FCFLAGS="-g -O2 -fsanitize=thread" \
CXXFLAGS="-std=gnu99 -g -O2 -fsanitize=thread " \
LDFLAGS="-B$(pwd)/../libsanitizer/tsan/.libs/ -Wl,-rpath,$(pwd)/../libsanitizer/tsan/.libs/ -fsanitize=thread" \
> make.log 2>&1
make install > install.log 2>&1
> make.log 2>&1 || cat make.log
make install > install.log 2>&1 || cat install.log
cd $GCCROOT/obj/
fi
cd ../..
Expand Down

0 comments on commit 6c9a7f6

Please sign in to comment.