Skip to content

fix the failure when the dynamic loader path is different from the ones in libc #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packaging/packager
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ do
cp "$i" $PKG_DIR/lib
done

if [[ $INCLUDE_LIBC == true ]]; then
if [[ $INCLUDE_LIBC == true || -z "$PKG_LD" ]]; then
for i in "${libc_libs[@]}"
do
filename=$(basename "$i")
Expand All @@ -151,10 +151,15 @@ if [[ $INCLUDE_LIBC == true ]]; then
if [[ -z "$PKG_LD" ]]; then
PKG_LD=$filename
cp "$i" "$PKG_DIR/lib" # we want to follow the symlink (default behavior)
if [[ $INCLUDE_LIBC != true ]]; then
break
fi
fi
continue # We don't want the dynamic loader's symlink because its target is an absolute path (/lib/ld-*).
fi
cp --no-dereference "$i" "$PKG_DIR/lib"
if [[ $INCLUDE_LIBC == true ]]; then
cp --no-dereference "$i" "$PKG_DIR/lib"
fi
done
fi

Expand Down
Loading