summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-10-10 11:49:30 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-10-10 20:25:51 +0200
commitd81497fa6b17f863561158f527143d7fad05f8e9 (patch)
tree20f38a011912020257d81447951b99d5923875a0 /bin/ptxdist
parentbe5cea175565fe064bdb41d8da8af0cf0914001a (diff)
downloadptxdist-d81497fa6b17f863561158f527143d7fad05f8e9.tar.gz
ptxdist-d81497fa6b17f863561158f527143d7fad05f8e9.tar.xz
ptxdist: dump icecc-create-env output when it failsptxdist-2019.10.0
Save the output of icecc-create-env and dump it when creating the environment fails. The output may contains important error messages that can be used to fix the problem. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-xbin/ptxdist21
1 files changed, 15 insertions, 6 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index a04715b4b..727a5e16a 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -563,8 +563,11 @@ check_compiler_icecc() {
cd "${icecc_dir}/host"
"${PTXDIST_ICECC_CREATE_ENV}" --gcc \
"${wrapper_dir}/real/gcc" \
- "${wrapper_dir}/real/g++" > /dev/null 2>&1 || \
- ptxd_bailout "Failed!"
+ "${wrapper_dir}/real/g++" > "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \
+ {
+ cat "${PTXDIST_TEMPDIR}/icecc.log"
+ ptxd_bailout "Failed to create icecc host environment!"
+ }
ln -s "$(readlink -f "${wrapper_dir}/real/gcc")" "${icecc_dir}/gcc"
if [ -n "${compiler_prefix}" ]; then
@@ -577,8 +580,11 @@ check_compiler_icecc() {
fi
"${PTXDIST_ICECC_CREATE_ENV}" "${args[@]}" --gcc \
"${wrapper_dir}/real/${compiler_prefix}gcc" \
- "${wrapper_dir}/real/${compiler_prefix}g++" > /dev/null 2>&1 || \
- ptxd_bailout "Failed!"
+ "${wrapper_dir}/real/${compiler_prefix}g++" > "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \
+ {
+ cat "${PTXDIST_TEMPDIR}/icecc.log"
+ ptxd_bailout "Failed to create icecc target environment!"
+ }
if [ ${#args[*]} -gt 0 ]; then
tar --strip-components=2 -xf *.tar.gz usr/bin/as &&
./as --verbose --version > env.log 2>&1 &&
@@ -588,8 +594,11 @@ check_compiler_icecc() {
rm *.tar.gz
"${PTXDIST_ICECC_CREATE_ENV}" --gcc \
"${wrapper_dir}/real/${compiler_prefix}gcc" \
- "${wrapper_dir}/real/${compiler_prefix}g++" > /dev/null || \
- ptxd_bailout "Failed!"
+ "${wrapper_dir}/real/${compiler_prefix}g++" > "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \
+ {
+ cat "${PTXDIST_TEMPDIR}/icecc.log"
+ ptxd_bailout "Failed to create icecc target environment!"
+ }
fi
rm as env.log real.log
fi