mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools
@ 2014-07-22 15:22 Bernhard Walle
  2014-07-23  6:19 ` Matthias Klein
  0 siblings, 1 reply; 4+ messages in thread
From: Bernhard Walle @ 2014-07-22 15:22 UTC (permalink / raw)
  To: ptxdist; +Cc: Bernhard Walle

This patch adds symlinks in the toolchain wrapper dir for
toolchain-related tools like as, nm, etc. Currently, that symlinks are
only created for tools for which ptxdist provides the wrapper mechanism.

The primary use case is our internal build system (application that
resides in local_src) that expects all programs to be at the same
location (because some very complicated magic...).

Apart from that, I think the solution to have all tools at the same
place is cleaner and the patch is very small. So it would be nice if it
could be accepted.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 bin/ptxdist | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/ptxdist b/bin/ptxdist
index 45b3540..d9758e3 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -610,6 +610,12 @@ check_compiler() {
 		}
 	done
 
+	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
+		tool_abs="$(which "${tool}" 2>/dev/null)"
+		ptxd_replace_link "${tool_abs}" "${wrapper_dir}/${tool}" || \
+			ptxd_bailout "Unable to create host ${tool} wrapper link"
+	done
+
 	if ptxd_get_ptxconf PTXCONF_BUILD_TOOLCHAIN >/dev/null; then
 		PATH="${wrapper_dir}:${PATH}"
 		return
@@ -712,6 +718,9 @@ check_compiler() {
 		ptxd_replace_link "$(which ${compiler_prefix}${cc})" "${wrapper_dir}/real/${compiler_prefix}${cc}" &&
 		ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}"
 	done &&
+	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
+		ptxd_replace_link "$(which ${compiler_prefix}${tool})"  "${wrapper_dir}/${compiler_prefix}${tool}"
+	done &&
 	PATH="${wrapper_dir}:${PATH}" &&
 	if [ -n "${PTXDIST_ICECC}" ]; then
 		local icecc_dir="${sysroot_host}/lib/icecc"
-- 
2.0.2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools
  2014-07-22 15:22 [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools Bernhard Walle
@ 2014-07-23  6:19 ` Matthias Klein
  2014-08-05 15:05   ` Tim Niemeyer
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Klein @ 2014-07-23  6:19 UTC (permalink / raw)
  To: ptxdist

Hello Bernhard,

until now I did not test you patch, but I also have to link all these 
toolchain programs into the sysroot-host/lib/wrapper/ directory for 
using everything with QtCreator.


Best regards,
Matthias


Am 22.07.2014 17:22, schrieb Bernhard Walle:
> This patch adds symlinks in the toolchain wrapper dir for
> toolchain-related tools like as, nm, etc. Currently, that symlinks are
> only created for tools for which ptxdist provides the wrapper mechanism.
>
> The primary use case is our internal build system (application that
> resides in local_src) that expects all programs to be at the same
> location (because some very complicated magic...).
>
> Apart from that, I think the solution to have all tools at the same
> place is cleaner and the patch is very small. So it would be nice if it
> could be accepted.
>
> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>   bin/ptxdist | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/bin/ptxdist b/bin/ptxdist
> index 45b3540..d9758e3 100755
> --- a/bin/ptxdist
> +++ b/bin/ptxdist
> @@ -610,6 +610,12 @@ check_compiler() {
>   		}
>   	done
>   
> +	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
> +		tool_abs="$(which "${tool}" 2>/dev/null)"
> +		ptxd_replace_link "${tool_abs}" "${wrapper_dir}/${tool}" || \
> +			ptxd_bailout "Unable to create host ${tool} wrapper link"
> +	done
> +
>   	if ptxd_get_ptxconf PTXCONF_BUILD_TOOLCHAIN >/dev/null; then
>   		PATH="${wrapper_dir}:${PATH}"
>   		return
> @@ -712,6 +718,9 @@ check_compiler() {
>   		ptxd_replace_link "$(which ${compiler_prefix}${cc})" "${wrapper_dir}/real/${compiler_prefix}${cc}" &&
>   		ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}"
>   	done &&
> +	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
> +		ptxd_replace_link "$(which ${compiler_prefix}${tool})"  "${wrapper_dir}/${compiler_prefix}${tool}"
> +	done &&
>   	PATH="${wrapper_dir}:${PATH}" &&
>   	if [ -n "${PTXDIST_ICECC}" ]; then
>   		local icecc_dir="${sysroot_host}/lib/icecc"


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools
  2014-07-23  6:19 ` Matthias Klein
@ 2014-08-05 15:05   ` Tim Niemeyer
  2014-08-05 15:22     ` Bernhard Walle
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Niemeyer @ 2014-08-05 15:05 UTC (permalink / raw)
  To: ptxdist

Hello

Am Mittwoch, den 23.07.2014, 08:19 +0200 schrieb Matthias Klein:
> Hello Bernhard,
> 
> until now I did not test you patch, but I also have to link all these 
> toolchain programs into the sysroot-host/lib/wrapper/ directory for 
> using everything with QtCreator.
I had problems with QtCreator, too. So i tested this patch and it solved
my problems.

So..
Tested-by: Tim Niemeyer <tim.niemeyer@corscience.de>

Best regards,
Tim

> 
> Am 22.07.2014 17:22, schrieb Bernhard Walle:
> > This patch adds symlinks in the toolchain wrapper dir for
> > toolchain-related tools like as, nm, etc. Currently, that symlinks are
> > only created for tools for which ptxdist provides the wrapper mechanism.
> >
> > The primary use case is our internal build system (application that
> > resides in local_src) that expects all programs to be at the same
> > location (because some very complicated magic...).
> >
> > Apart from that, I think the solution to have all tools at the same
> > place is cleaner and the patch is very small. So it would be nice if it
> > could be accepted.
> >
> > Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> > ---
> >   bin/ptxdist | 9 +++++++++
> >   1 file changed, 9 insertions(+)
> >
> > diff --git a/bin/ptxdist b/bin/ptxdist
> > index 45b3540..d9758e3 100755
> > --- a/bin/ptxdist
> > +++ b/bin/ptxdist
> > @@ -610,6 +610,12 @@ check_compiler() {
> >   		}
> >   	done
> >   
> > +	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
> > +		tool_abs="$(which "${tool}" 2>/dev/null)"
> > +		ptxd_replace_link "${tool_abs}" "${wrapper_dir}/${tool}" || \
> > +			ptxd_bailout "Unable to create host ${tool} wrapper link"
> > +	done
> > +
> >   	if ptxd_get_ptxconf PTXCONF_BUILD_TOOLCHAIN >/dev/null; then
> >   		PATH="${wrapper_dir}:${PATH}"
> >   		return
> > @@ -712,6 +718,9 @@ check_compiler() {
> >   		ptxd_replace_link "$(which ${compiler_prefix}${cc})" "${wrapper_dir}/real/${compiler_prefix}${cc}" &&
> >   		ptxd_replace_link "${SCRIPTSDIR}/wrapper/${cc}-wrapper" "${wrapper_dir}/${compiler_prefix}${cc}"
> >   	done &&
> > +	for tool in ar as cpp nm objcopy objdump ranlib readelf size strip ; do
> > +		ptxd_replace_link "$(which ${compiler_prefix}${tool})"  "${wrapper_dir}/${compiler_prefix}${tool}"
> > +	done &&
> >   	PATH="${wrapper_dir}:${PATH}" &&
> >   	if [ -n "${PTXDIST_ICECC}" ]; then
> >   		local icecc_dir="${sysroot_host}/lib/icecc"
> 
> 



-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools
  2014-08-05 15:05   ` Tim Niemeyer
@ 2014-08-05 15:22     ` Bernhard Walle
  0 siblings, 0 replies; 4+ messages in thread
From: Bernhard Walle @ 2014-08-05 15:22 UTC (permalink / raw)
  To: ptxdist

* Tim Niemeyer <tim.niemeyer@corscience.de> [2014-08-05 17:05]:
> Am Mittwoch, den 23.07.2014, 08:19 +0200 schrieb Matthias Klein:
> > 
> > until now I did not test you patch, but I also have to link all these 
> > toolchain programs into the sysroot-host/lib/wrapper/ directory for 
> > using everything with QtCreator.
> I had problems with QtCreator, too. So i tested this patch and it solved
> my problems.
> 
> So..
> Tested-by: Tim Niemeyer <tim.niemeyer@corscience.de>

It's already in ptxdist 2014.08... :)

Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-05 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22 15:22 [ptxdist] [PATCH] ptxdist: Create symlinks for toolchain-related tools Bernhard Walle
2014-07-23  6:19 ` Matthias Klein
2014-08-05 15:05   ` Tim Niemeyer
2014-08-05 15:22     ` Bernhard Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox