Skip to content
Snippets Groups Projects
Commit 2c4392b4 authored by Joe Garcia's avatar Joe Garcia
Browse files

fix absolute links in bin using relative links on linux

parent e3e62744
Branches base_2020Q1
No related tags found
No related merge requests found
......@@ -10306,6 +10306,15 @@ bundle_elfs() {
for elf in $(${PYTHON} sb3bin/thosewhohuntelfs.py --patchelf=${PATCHELF}/patchelf --hunt bin); do
_pydling $elf requires
done
#relink binaries relatively
for fa in $( find bin -type l | sed 's, ,@@@@,g' ) ; do
export f="$(echo $fa | sed 's,@@@@, ,g')"
echo Checking $f 1>&2
if [ -L "$f" -a -n "$(readlink "$f" | grep "${BASE}" )" ] ; then
echo Repairing link "$f" from $(readlink "$f") 1>&2
relative_link "$( readlink "$f" )" "$f"
fi
done
# fix RPATHs on ELF binaries, excluding libstdc++ and libgfortran
${PYTHON} sb3bin/thosewhohuntelfs.py . lib $( is64Bit && echo lib64 ) "$@" --patchelf=${PATCHELF}/patchelf \
--exclude='(?:.*?build/.*)|(?:.*?lib/libgfort.*)|(?:.*?lib/libstdc.*)' || oops "could not make binary bundle relocatable"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment