Skip to content

Commit

Permalink
mkinitramfs-ll.bash: copy libgcc_s.so and handle ld.so.cache (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
tokiclover committed Jun 2, 2018
1 parent 069cd3a commit e780aa8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mkinitramfs-ll.bash
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,16 @@ for (( i=0; i < ${#env[@]}; i++ )); do
done
unset env

# Handle GCC libraries symlinks
[[ -d usr/lib/gcc ]] &&
for lib in $(find usr/lib/gcc -iname 'lib*'); do
ln -fns /$lib lib/${lib##*/}
ln -fns /$lib usr/lib/${lib##*/}
# Handle GCC libraries
for dir in $(sed -nre '/^\/.*gcc.*/p' /etc/ld.so.conf /etc/ld.so.conf.d/*); do
if [[ -e ${dir}/libgcc_s.so ]]; then
mkdir -p .${dir}
cp ${dir}/libgcc_s.so* .${dir}
fi
done
cp -ar /etc/ld.so.* etc
echo >etc/ld.so.cache
ldconfig -r "${opts[-tmpdir]}" -f etc/ld.so.conf -C etc/ld.so.cache

docpio || die
[[ "${opts[-K]}" || "${opts[-keep-tmpdir]}" ]] || rm -rf ${opts[-tmpdir]}
Expand Down

0 comments on commit e780aa8

Please sign in to comment.