From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: From: Lucas Stach Date: Thu, 14 Aug 2014 23:50:56 +0200 Message-Id: <1408053056-2883-1-git-send-email-dev@lynxeye.de> Subject: [ptxdist] [PATCH] fix toolchain build with active icecc Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Lucas Stach From: Lucas Stach For toolchain builds to work when icecc is activated we still need to create the host environment, otherwise we provide an empty ICECC_VERSION and hilarity ensues. As we don't have a selected_toolchain in this case, simply check if we already have a packaged env, otherwise create one. Signed-off-by: Lucas Stach --- For now I only checked that the build finishes successfully with this patch, but didn't check if the resulting toolchain works correctly. --- bin/ptxdist | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bin/ptxdist b/bin/ptxdist index aafccf8..0718607 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -618,6 +618,24 @@ check_compiler() { if ptxd_get_ptxconf PTXCONF_BUILD_TOOLCHAIN >/dev/null; then PATH="${wrapper_dir}:${PATH}" + if [ -n "${PTXDIST_ICECC}" ]; then + local icecc_dir="${sysroot_host}/lib/icecc" + if ! "${PTXDIST_ICECC}" --version | grep -q 'ICECC 1\.'; then + ptxd_bailout "PTXdist only supports icecc 1.x" + fi + if ! stat -t "${icecc_dir}/host"/*.tar.gz >/dev/null 2>&1; then + mkdir -p "${icecc_dir}/host" && + ( + echo "Creating icecc host environment..." + cd "${icecc_dir}/host" + "${PTXDIST_ICECC_CREATE_ENV}" --gcc \ + "${wrapper_dir}/real/gcc" \ + "${wrapper_dir}/real/g++" > /dev/null 2>&1 || \ + ptxd_bailout "Failed!" + ) + fi + export ICECC_VERSION_HOST="$(ls "${icecc_dir}/host"/*.tar.gz)" + fi return fi -- 1.9.3 -- ptxdist mailing list ptxdist@pengutronix.de