Subject: bug#8537: oops, NOTABUG - sorry, oops, STILLABUG

From: Jason Vas Dias <[email-masked]>
Date: Fri, 22 Apr 2011 20:03:51 +0100

$ gcc -m32 -print-search-dirs | grep libraries
libraries: =/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/4.6.0/32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../x86_64-pc-linux-gnu/lib/../lib32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../x86_64-pc-linux-gnu/4.6.0/32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../lib32/:/lib/x86_64-pc-linux-gnu/4.6.0/32/:/lib/../lib32/:/usr/lib/x86_64-pc-linux-gnu/4.6.0/32/:/usr/lib/../lib32/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../x86_64-pc-linux-gnu/lib/x86_64-pc-linux-gnu/4.6.0/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../x86_64-pc-linux-gnu/4.6.0/:/usr/lib64/gcc/x86_64-pc-linux-gnu/4.6.0/../../../:/lib/x86_64-pc-linux-gnu/4.6.0/:/lib/:/usr/lib/x86_64-pc-linux-gnu/4.6.0/:/usr/lib/
$ gcc -m32 -print-multi-os-directory
../lib32

The $LIBDIR during the poppler  build was /usr/lib32, so this can't be
an autoconf / automake issue.

If libtool is using some variant of the above gcc command to determine
the correct -L option for the gcc libraries, WHY
isn't it using the FIRST value gcc emits ?

What  libtool  should be doing instead is using something like :

  -L$(cd ${LIBDIR:-/usr/lib}/$($CC $CFLAGS -print-multi-os-directory) ; pwd;)