[elbe-devel] [PATCH] WIP: Prevent SDK segfault for amd64 targets

bage at linutronix.de bage at linutronix.de
Fri Mar 12 20:05:37 CET 2021


From: Bastian Germann <bage at linutronix.de>

Addresses #292.

Co-developed-by: Olivier Dion <dion at linutronix.de>
Signed-off-by: Bastian Germann <bage 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.1



More information about the elbe-devel mailing list