* [ptxdist] [PATCH] fix toolchain build with active icecc
@ 2014-08-14 21:50 Lucas Stach
2014-09-01 9:27 ` Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2014-08-14 21:50 UTC (permalink / raw)
To: ptxdist; +Cc: Lucas Stach
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] fix toolchain build with active icecc
2014-08-14 21:50 [ptxdist] [PATCH] fix toolchain build with active icecc Lucas Stach
@ 2014-09-01 9:27 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2014-09-01 9:27 UTC (permalink / raw)
To: ptxdist
On Fri, Aug 15, 2014 at 12:31:44PM +0200, Lucas Stach wrote:
> 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.
I've commited a different fix. Please test.
Michael
> 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
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-01 9:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-14 21:50 [ptxdist] [PATCH] fix toolchain build with active icecc Lucas Stach
2014-09-01 9:27 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox