diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-05-05 16:17:56 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-05-09 16:11:50 +0200 |
commit | 64358552ea14ec42462a917cb146a92feb85ce10 (patch) | |
tree | f8c242ef791a34cbd39e07a499566fce6257fccd | |
parent | d5cf58623244e443a7e42dec10d6b308927bb982 (diff) | |
download | ptxdist-64358552ea14ec42462a917cb146a92feb85ce10.tar.gz ptxdist-64358552ea14ec42462a917cb146a92feb85ce10.tar.xz |
ptxd_lib_setup_target_icecc: all creating environments without g++
The first-stage cross-compiler during the toolchain build needs this,
because it is build without g++.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_lib_icecc.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/scripts/lib/ptxd_lib_icecc.sh b/scripts/lib/ptxd_lib_icecc.sh index 59f1be174..64e7c10f9 100644 --- a/scripts/lib/ptxd_lib_icecc.sh +++ b/scripts/lib/ptxd_lib_icecc.sh @@ -79,13 +79,19 @@ ptxd_lib_setup_target_icecc() { echo "Creating icecc target environment..." cd "${icecc_dir}/target" local -a args + local gxx + if [ -e "${wrapper_dir}/real/${compiler_prefix}g++" ]; then + gxx="${wrapper_dir}/real/${compiler_prefix}g++" + else + gxx="/bin/false" + fi if [ -e "${wrapper_dir}/real/${compiler_prefix}clang" ]; then args[${#args[@]}]="--clang" args[${#args[@]}]="${wrapper_dir}/real/${compiler_prefix}clang" fi "${PTXDIST_ICECC_CREATE_ENV}" "${args[@]}" --gcc \ - "${wrapper_dir}/real/${compiler_prefix}gcc" \ - "${wrapper_dir}/real/${compiler_prefix}g++" > "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \ + "${wrapper_dir}/real/${compiler_prefix}gcc" "${gxx}" > \ + "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \ { cat "${PTXDIST_TEMPDIR}/icecc.log" ptxd_bailout "Failed to create icecc target environment!" @@ -98,8 +104,8 @@ ptxd_lib_setup_target_icecc() { echo "Broken icecc-create-env, disabling icecc clang support!" rm *.tar.gz "${PTXDIST_ICECC_CREATE_ENV}" --gcc \ - "${wrapper_dir}/real/${compiler_prefix}gcc" \ - "${wrapper_dir}/real/${compiler_prefix}g++" > "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \ + "${wrapper_dir}/real/${compiler_prefix}gcc" "${gxx}" > \ + "${PTXDIST_TEMPDIR}/icecc.log" 2>&1 || \ { cat "${PTXDIST_TEMPDIR}/icecc.log" ptxd_bailout "Failed to create icecc target environment!" |