Re: libdl bugs
"Markus Wichmann" <[email protected]>
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
A script this young and already a bug has to be fixed:
Markus Wichmann schrieb:
> #v+
> if [ -r /etc/diet.ld.conf ]
> then
> libdir="$( </etc/diet.ld.conf sed '/^#/d; /^\s*$/d' | tr '\n' ':')"
> fi
>
> if [ -n "$LIBDIR" ]
> then
> libdir="${libdir}${libdir:+:}$LIBDIR"
> fi
>
> if [ -z "$libdir" ]
> then
> libdir="/lib:/usr/lib"
> fi
>
- if [ "$1" == "-v" ]
+ if [ "$1" = "-v" ]
> then
> VERBOSE="-v"
> fi
>
> oldIFS="$IFS"
> IFS=:
> set -- $libdir
> IFS="
> "
>
> for i
> do
> if [ -d "$i" ]; then
> for j in "$i"/*
> do
> if [ -f "$j" ]
> then
> soname=$(readelf -d "$j" | grep SONAME)
> if [ -n "$soname" ]
> then
> soname=$(echo $soname |\
sed -e 's/.*\[//' -e 's/\].*//')
+ if [ "$soname" != "$j" ]; then
> ln -sf $VERBOSE "$j" "$soname"
+ fi
> fi
> fi
> done
> fi
> done
>
> IFS="$oldIFS"
> #v-
That should do it now. Doesn't work for multilib targets, though, but who
needs multilib, anyway? Only people relying on already-compiled
proprietary software. Most of it will be compiled for use with glibc. So
it'll be software that will never work with dietlibc anyway, so why
bother?
Regards,
Markus
--
Progress (n.): Process through which USENET evolved from smart people in
front of dumb terminals to dumb people in front of smart terminals.