mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: ptxdist@pengutronix.de
Cc: Lucas Stach <l.stach@pengutronix.de>
Subject: [ptxdist] [PATCH] fix toolchain build with active icecc
Date: Thu, 14 Aug 2014 23:50:56 +0200	[thread overview]
Message-ID: <1408053056-2883-1-git-send-email-dev@lynxeye.de> (raw)

From: Lucas Stach <l.stach@pengutronix.de>

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 <l.stach@pengutronix.de>
---
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

             reply	other threads:[~2014-08-14 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 21:50 Lucas Stach [this message]
2014-09-01  9:27 ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408053056-2883-1-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=l.stach@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox