summaryrefslogtreecommitdiffstats
path: root/bin/ptxdist
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-11-11 15:47:19 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-11-11 15:47:19 +0100
commitfbc692de8072b9dfc96315662aed4fc56855e3dc (patch)
treeccfe32ce66ccdbaef325790354851fca81593728 /bin/ptxdist
parentc71afa266bb497cb07ed7312fd89ff2e1a0fe2f1 (diff)
downloadptxdist-fbc692de8072b9dfc96315662aed4fc56855e3dc.tar.gz
ptxdist-fbc692de8072b9dfc96315662aed4fc56855e3dc.tar.xz
ptxdist: try harder to detect if a new icecc environment must be created
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-xbin/ptxdist12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/ptxdist b/bin/ptxdist
index 633b59933..484f15d2c 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -553,8 +553,13 @@ check_compiler_icecc() {
if [ -n "${toolchain}" -a "$(readlink -f "${icecc_dir}/toolchain")" != "${toolchain}" ]; then
rm -rf "${icecc_dir}"
fi
- if [ "$(readlink -f "${wrapper_dir}/real/gcc")" != "$(readlink -f "${icecc_dir}/gcc")" ]; then
- rm -rf "${icecc_dir}"
+ "${wrapper_dir}/real/gcc" --version > "${PTXDIST_TEMPDIR}/host-gcc-version" 2>&1
+ "${wrapper_dir}/real/${compiler_prefix}gcc" --version > "${PTXDIST_TEMPDIR}/target-gcc-version" 2>&1
+ if [ -d "${icecc_dir}" ]; then
+ if ! diff -q "${PTXDIST_TEMPDIR}/host-gcc-version" "${icecc_dir}/host-gcc-version" >& /dev/null || \
+ ! diff -q "${PTXDIST_TEMPDIR}/target-gcc-version" "${icecc_dir}/target-gcc-version" >& /dev/null; then
+ rm -rf "${icecc_dir}"
+ fi
fi
if [ ! -d "${icecc_dir}" ]; then
if ! "${PTXDIST_ICECC}" --version | grep -q 'ICECC 1\.'; then
@@ -582,7 +587,8 @@ check_compiler_icecc() {
ptxd_bailout "Failed!"
ln -s "${toolchain}" "${icecc_dir}/toolchain"
fi
- )
+ ) &&
+ mv "${PTXDIST_TEMPDIR}/host-gcc-version" "${PTXDIST_TEMPDIR}/target-gcc-version" "${icecc_dir}/"
fi &&
ptxd_get_path "${icecc_dir}/host"/*.tar.gz &&