Applied Andreas Jaeger's patch for library linking:
<<<<<<<<<<<<<<<<<<<<<<
The ltp tests link files in the wrong order, this is rather important
with static libraries - especially since glibc 2.3.2 contains a
libpthread.so that is a linker script referencing a static library.

The following is wrong:
gcc -lm file.o -o file
The order has to be: "file.o -lm"

I'm appending a first round of patches to get this fixed.

I noticed a number of failures with the threads tests and also
problems when compiling in a static environment.

I renamed LDFLAGS since those are  flags (and therefore come before
the objects), LDLIBS should be used instead.
>>>>>>>>>>>>>>>>>>>>>>>
77 files changed