From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) Description of problem: On IA32 RH 7.2, why is the static libpthread.a built with -UFLOATING_STACKS and the dynamic libpthread.so is built with -DFLOATING_STACKS? For consistency both should be built with -DFLOATING_STACKS. Because of this difference, we are seeing many issues from users regarding limited thread stack sizes. Can the default be to build them with -DFLOATING_STACKS for the distribution. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Standard 7.2 distribution 2. 3. Additional info:
This is done on purpose. FLOATING_STACKS require a quite recent kernel (2.4.8 or above) and i686, so if libpthread.a was compiled that way, statically linked programs against that wouldn't run or wouldn't run correctly on pre 2.4.8 kernels or on pre-i686 machines. When libpthread is linked dynamically, such decision is done on runtime (dynamic linker chooses either /lib/libpthread.so.0 or /lib/i686/libpthread.so.0 based on actual kernel version, plus the fact whether i686 or i386 glibc is installed ensures that dynamically linked programs against -lpthread can run on pre-i686. Having a libpthread.a which would at runtime choose whether it wants to use FLOATING_STACKS or not would slow it down a lot, so I think it is out of the question. What are the reasons why somebody wants to link -lpthread statically in BTW? IMHO -Bstatic ... -Bdynamic -lpthread works just fine.