[elbe-devel] [PATCH] Prevent SDK segfault for amd64 targets
bage at linutronix.de
bage at linutronix.de
Mon Mar 15 15:26:07 CET 2021
From: Bastian Germann <bage at linutronix.de>
The cross compiler in a SDK generated for amd64 based on Debian buster
segfaults on execution. Skip elf-patching the rpath in unnecessary cases.
Fixes #292.
Co-developed-by: Olivier Dion <dion at linutronix.de>
Signed-off-by: Bastian Germann <bage at linutronix.de>
Tested-by: Christian Teklenborg <chris at linutronix.de>
---
elbepack/makofiles/toolchain-shar-extract.sh.mako | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/elbepack/makofiles/toolchain-shar-extract.sh.mako b/elbepack/makofiles/toolchain-shar-extract.sh.mako
index 7b3acdbf9..6e07edba6 100644
--- a/elbepack/makofiles/toolchain-shar-extract.sh.mako
+++ b/elbepack/makofiles/toolchain-shar-extract.sh.mako
@@ -355,7 +355,11 @@ done
# do not skip the interpreter, and do not handle target_executable
# files yet.
for exe in $target_elf_files; do
- \$PATCHELF --set-rpath $native_sysroot/usr/lib/${real_multimach_target_sys}/:$native_sysroot/lib/${real_multimach_target_sys}/:$native_sysroot/usr/lib:$native_sysroot/lib \$exe
+ if [ "${target_elfcode}" = "x86-64" -a \`readlink -f \$exe\` == \`readlink -f $dl_path\` ]; then
+ echo SKIP \$exe
+ else
+ \$PATCHELF --set-rpath $native_sysroot/usr/lib/${real_multimach_target_sys}/:$native_sysroot/lib/${real_multimach_target_sys}/:$native_sysroot/usr/lib:$native_sysroot/lib \$exe
+ fi
done
for exe in $ascii_so_files; do
--
2.30.2
More information about the elbe-devel
mailing list