diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-18 20:38:49 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-06-18 20:38:49 +0200 |
commit | a1e929d4cdd7e1ff42cd3593cc7b6da9c1b63cc3 (patch) | |
tree | a02aa917b9fe63ccb6c40e982f454ce871dcdfa5 /bin/ptxdist | |
parent | 6427f02ead6bfd4cbca5ec2b371e4a84a978f5a0 (diff) | |
download | ptxdist-a1e929d4cdd7e1ff42cd3593cc7b6da9c1b63cc3.tar.gz ptxdist-a1e929d4cdd7e1ff42cd3593cc7b6da9c1b63cc3.tar.xz |
ptxdist: add support for icecc
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin/ptxdist')
-rwxr-xr-x | bin/ptxdist | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 43dad5833..baf60f1ab 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -708,6 +708,26 @@ check_compiler() { ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}" done PATH="${wrapper_dir}:${PATH}" + if [ -n "${PTXDIST_ICECC}" ]; then + local icecc_dir="${sysroot_host}/lib/icecc" + if [ "$(readlink -f "${icecc_dir}/toolchain")" != "${toolchain}" ]; then + rm -rf "${icecc_dir}" + mkdir -p "${icecc_dir}/target" "${icecc_dir}/host" + ln -s "${toolchain}" "${icecc_dir}/toolchain" + ( + cd "${icecc_dir}/target" + "${PTXDIST_ICECC_CREATE_ENV}" --gcc \ + "${wrapper_dir}/real/${compiler_prefix}gcc" \ + "${wrapper_dir}/real/${compiler_prefix}g++" > /dev/null + cd "${icecc_dir}/host" + "${PTXDIST_ICECC_CREATE_ENV}" --gcc \ + "${wrapper_dir}/real/gcc" \ + "${wrapper_dir}/real/g++" > /dev/null + ) + fi + export ICECC_VERSION_TARGET="$(ls "${icecc_dir}/target"/*.tar.gz)" + export ICECC_VERSION_HOST="$(ls "${icecc_dir}/host"/*.tar.gz)" + fi } @@ -2405,6 +2425,18 @@ setup_path() { sleep 3 fi fi + if [ -n "${PTXCONF_SETUP_ICECC}" ]; then + PTXDIST_ICECC="$(which icecc 2>/dev/null)" + PTXDIST_ICECC_CREATE_ENV="$(which "${PTXCONF_SETUP_ICECC_CREATE_ENV}")" + if [ -z "${PTXDIST_ICECC}" -o -z "${PTXDIST_ICECC_CREATE_ENV}" ]; then + echo + echo "${PTXDIST_LOG_PROMPT}warning: icecc has been activated, but was not found on your system" + echo "${PTXDIST_LOG_PROMPT}warning: install icecc, disable it ('ptxdist setup' -> 'Developer Options' menu)" + echo "${PTXDIST_LOG_PROMPT}warning: or ignore this warning." + echo + sleep 3 + fi + fi } @@ -2488,6 +2520,7 @@ setup_export() { \ PTXDIST_CCACHE \ PTXDIST_FORCE_DOWNLOAD \ + PTXDIST_ICECC \ PTXDIST_LOG_PROMPT \ PTXDIST_PEDANTIC \ PTXDIST_QUIET \ |