Skip to content

Commit

Permalink
Update a post: portable-gcc-toolchain.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adonis0147 committed Oct 30, 2024
1 parent 0a6fc8c commit dff0474
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions content/post/portable-gcc-toolchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,9 @@ function relocate() {
while read -r file; do
if old_rpath="$(patchelf --print-rpath "${file}" 2>/dev/null)"; then
if ${overwrite}; then
old_rpath="\$ORIGIN:\$ORIGIN/lib:\$ORIGIN/lib64:\$ORIGIN/../lib:\$ORIGIN/../lib64"
old_rpath="\$ORIGIN:\$ORIGIN/lib64:\$ORIGIN/lib:\$ORIGIN/../lib64:\$ORIGIN/../lib"
fi
new_rpath="${old_rpath:+${old_rpath}:}${library_path}"
new_rpath="${library_path}${old_rpath:+:${old_rpath}}"
patchelf --set-rpath "${new_rpath}" "${file}"
if readelf -S "${file}" | grep '.interp' >/dev/null; then
patchelf --set-interpreter "${interpreter}" "${file}"
Expand Down Expand Up @@ -625,13 +625,13 @@ function configure_toolchain() {
popd >/dev/null || exit
local rpaths=(
"$(pwd)/$(uname -m)-linux-gnu/lib"
"$(dirname "${libc_so}")"
"\$ORIGIN"
"\$ORIGIN/lib"
"\$ORIGIN/lib64"
"\$ORIGIN/../lib"
"\$ORIGIN/lib"
"\$ORIGIN/../lib64"
"$(pwd)/$(uname -m)-linux-gnu/lib"
"$(dirname "${libc_so}")"
"\$ORIGIN/../lib"
)
local rpaths_in_line
rpaths_in_line="$(
Expand Down

0 comments on commit dff0474

Please sign in to comment.