diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-05-05 16:15:16 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-05-09 16:11:50 +0200 |
commit | d5cf58623244e443a7e42dec10d6b308927bb982 (patch) | |
tree | 4b166717824f39255bec80f35b399ecb05052ef8 | |
parent | 89607b4ad17d2cf4457e265dda226ac2e48221c9 (diff) | |
download | ptxdist-d5cf58623244e443a7e42dec10d6b308927bb982.tar.gz ptxdist-d5cf58623244e443a7e42dec10d6b308927bb982.tar.xz |
icecc: evaluate ICECC_VERSION path when needed
This makes it possible to create the icecc environment later during
building. This can be used by toolchain builds to generate the target
environment after building the cross-compiler.
Note: Using echo to set ICECC_VERSION= is ok here. If there is no
environment then ICECC_VERSION points to a non-existing file and icecc will
be disabled later.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rwxr-xr-x | bin/ptxdist | 1 | ||||
-rw-r--r-- | scripts/lib/ptxd_lib_icecc.sh | 6 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 1 | ||||
-rw-r--r-- | scripts/wrapper/libwrapper.sh | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 137bd2f24..1e10c08d4 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -2555,6 +2555,7 @@ setup_export() { PTXDIST_CCACHE \ PTXDIST_FORCE_DOWNLOAD \ PTXDIST_ICECC \ + PTXDIST_ICECC_CREATE_ENV \ PTXDIST_LOG_PROMPT \ PTXDIST_OUTPUT_SYNC \ PTXDIST_DIRTY \ diff --git a/scripts/lib/ptxd_lib_icecc.sh b/scripts/lib/ptxd_lib_icecc.sh index 3682201f0..59f1be174 100644 --- a/scripts/lib/ptxd_lib_icecc.sh +++ b/scripts/lib/ptxd_lib_icecc.sh @@ -46,8 +46,7 @@ ptxd_lib_setup_host_icecc() { mv "${PTXDIST_TEMPDIR}/host-gcc-version" "${icecc_dir}/" fi && - ptxd_get_path "${icecc_dir}/host"/*.tar.gz && - export ICECC_VERSION_HOST="${ptxd_reply}" && + export PTXDIST_ICECC_DIR="${icecc_dir}" && if "${PTXDIST_ICECC}" --help | grep -q ICECC_REMOTE_CPP; then export PTXDIST_ICECC_REMOTE_CPP=1 @@ -114,8 +113,7 @@ ptxd_lib_setup_target_icecc() { fi && ptxd_get_path "${icecc_dir}/target"/*.tar.gz && - export ICECC_VERSION_TARGET="${ptxd_reply}" - if tar -tf "${ICECC_VERSION_TARGET}" | grep -q clang; then + if tar -tf "${ptxd_reply}" | grep -q clang; then export PTXDIST_ICECC_CLANG=1 fi } diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh index 4f13e104c..3b52b55d8 100644 --- a/scripts/lib/ptxd_make_00-init.sh +++ b/scripts/lib/ptxd_make_00-init.sh @@ -303,6 +303,7 @@ ptxd_init_save_wrapper_env() { PTXDIST_HOST_LDFLAGS="${PTXDIST_HOST_LDFLAGS}" PTXDIST_PLATFORMDIR="${PTXDIST_PLATFORMDIR}" PTXDIST_SYSROOT_TOOLCHAIN="${PTXDIST_SYSROOT_TOOLCHAIN}" + PTXDIST_ICECC_DIR="${PTXDIST_ICECC_DIR}" PTXDIST_ICECC_REMOTE_CPP="${PTXDIST_ICECC_REMOTE_CPP}" PTXDIST_ICECC_CLANG="${PTXDIST_ICECC_CLANG}" EOF diff --git a/scripts/wrapper/libwrapper.sh b/scripts/wrapper/libwrapper.sh index 91bb955a8..2293c75bb 100644 --- a/scripts/wrapper/libwrapper.sh +++ b/scripts/wrapper/libwrapper.sh @@ -292,25 +292,25 @@ add_icecc_args() { cc_add_target_icecc() { add_icecc_args "${@}" - export ICECC_VERSION="${ICECC_VERSION_TARGET}" + export ICECC_VERSION="$(echo ${PTXDIST_ICECC_DIR}/target/*.tar.gz)" export ICECC_CC="${FULL_CMD}" } cxx_add_target_icecc() { add_icecc_args "${@}" - export ICECC_VERSION="${ICECC_VERSION_TARGET}" + export ICECC_VERSION="$(echo ${PTXDIST_ICECC_DIR}/target/*.tar.gz)" export ICECC_CXX="${FULL_CMD}" } cc_add_host_icecc() { add_icecc_args "${@}" - export ICECC_VERSION="${ICECC_VERSION_HOST}" + export ICECC_VERSION="$(echo ${PTXDIST_ICECC_DIR}/host/*.tar.gz)" export ICECC_CC="${FULL_CMD}" } cxx_add_host_icecc() { add_icecc_args "${@}" - export ICECC_VERSION="${ICECC_VERSION_HOST}" + export ICECC_VERSION="$(echo ${PTXDIST_ICECC_DIR}/host/*.tar.gz)" export ICECC_CXX="${FULL_CMD}" } |