[vorbis-dev] Re: [vorbis] bug in glibc 2.1.2 and older
R.L. Horn
rlhorn at mailroom.com
Tue Jun 27 13:28:35 PDT 2000
On Mon, 26 Jun 2000, Monty wrote:
> Insufficient! The bug is *not* in the compiler. It is in the glibc headers.
> I can make bleededing edge GCC break very easily with the bad glibc.
It seems to me that you could get the glibc version with something like:
LIBC=`/sbin/ldconfig -p | grep "libc\.so\.6" | sed "s/.*=> //"`
LIBCVER=`ls -l $LIBC | sed "s/.*-> libc-//" | sed "s/\.so//"`
A subexpression substitution for the latter would be more elegant, but
either they're broken in my copy of sed or I don't know how to work them.
The perl equivalent would obviously be:
ls -l $LIBC | perl -pe "s/.*-> libc-(.+)\.so/\1/"
In practice, you might end up with something like:
case $host in
*-*-linux*)
OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
echo -n "checking glibc version... "
LIBC=`/sbin/ldconfig -p | grep "libc\.so\.6" | sed "s/.*=> //"`
LIBCVER=`ls -l $LIBC | sed "s/.*-> libc-//" | sed "s/\.so//"`
echo $LIBCVER
case $LIBCVER in
2.0.* | 2.1.0 | 2.1.1 | 2.1.2)
OPT="$OPT -D__NO_MATH_INLINES"
echo "using -D__NO_MATH_INLINES"
esac
unset LIBC LIBCVER
DEBUG=...
in configure.in. Believe it or not, this does work (within extremely
narrow parameters, of course).
Yes, I know it's an ugly sort of hack, but with only __GLIBC__ and
__GLIBC_MINOR__ defined in the headers I'm not sure what else to do.
If any autoconf experts out there have a better idea I'd sure like to hear
it (heck, maybe there's a macro for doing this that everyone else already
knows about).
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
More information about the Vorbis-dev
mailing list