> No, gcc (the linker really) is doing exactly what you are > telling it. The linker already brings in libc, you have > to use -nostdlib to prevent it. You must link to objects > in the correct order. libpthread, libthr, and libc_r all > provide some functions that are overloaded from libc. > When you link to libc first, you get the libc versions of > those functions instead of the thread versions of them.
Ah, thanks! That makes sense now! I had assumed it somehow links libc twice, but if it's really an order issue, all becomes clear! >>And, something in the 5.3->5.4 upgrade process went wrong which left me >>with a broken libpthread. Can't say what exactly, maybe my system was >>slightly broken to begin with. > > libpthread ain't broke; your applications are probably linked > incorrectly. I'm not saying the code is broken, just my binaries. I've now replaced them with files from a clean installation, and all is well. Cheers Benjamin
signature.asc
Description: OpenPGP digital signature
