cc-wrapper: Fix adding directories to rpath

This fixes a bug introduced in #27831: `for path in "$dir"/lib*.so` assumed that
all libs match `lib*.so`, but 07674788d6932fe702117649b4cd16512d2da8a9 started
adding libs that match `*.so` and `*.so.*`.

authored by Orivej Desh and committed by Robin Gloster c8f7f18e 3e981b9e

+1 -1
+1 -1
pkgs/build-support/cc-wrapper/ld-wrapper.sh
··· 129 129 # copied to $out/lib. If not, we're screwed. 130 130 continue 131 131 fi 132 - for path in "$dir"/lib*.so; do 132 + for path in "$dir"/*; do 133 133 file="${path##*/}" 134 134 if [ "${libs[$file]:-}" ]; then 135 135 libs["$file"]=