[elbe-devel] [PATCH] Make SDK install script buster compatible
John Ogness
john.ogness at linutronix.de
Wed Oct 23 10:08:27 CEST 2019
On 2019-10-22, bage at linutronix.de wrote:
> From: Bastian Germann <bage at linutronix.de>
>
> The SDK install script searches for ld-linux.so* in $native_sysroot/lib which
No, it searches for ld-linux*
> is not available on buster (tested for armhf target).
>
> Search the whole $native_sysroot directory to find files in usr/lib as well.
>
> Signed-off-by: Bastian Germann <bage at linutronix.de>
> ---
> elbepack/makofiles/toolchain-shar-extract.sh.mako | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/elbepack/makofiles/toolchain-shar-extract.sh.mako b/elbepack/makofiles/toolchain-shar-extract.sh.mako
> index a56d1ae8c..7e432d125 100644
> --- a/elbepack/makofiles/toolchain-shar-extract.sh.mako
> +++ b/elbepack/makofiles/toolchain-shar-extract.sh.mako
> @@ -282,7 +282,7 @@ fi
>
> # fix dynamic loader paths in all ELF SDK binaries
> native_sysroot=$target_sdk_dir/sysroots/host
> -dl_path=$($SUDO_EXEC find $native_sysroot/lib -name "ld-linux*")
> +dl_path=$($SUDO_EXEC find $native_sysroot -name "ld-linux.so*")
This is a problem for several reasons:
1. ld-linux.so* does not match the dynamic loader for other
architectures
2. searching that openly could match unintentional files
IMO it should look more like this:
dl_path=''
for p in $native_sysroot/lib $native_sysroot/usr/lib; do
test -d $p && ! test -L $p || continue
dl_path=$($SUDO_EXEC find $p -name 'ld-linux*')
break
done
Actually, there are quite a few things that the script does that I find
horribly hacky. But the above suggestion should at least let things work
as good as before, but for stretch and buster.
John Ogness
More information about the elbe-devel
mailing list