Bug 65777

Summary: static and shared versions of libpthread built differently
Product: [Retired] Red Hat Linux Reporter: Suresh Rao <suresh.k.rao>
Component: libcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 20:44:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Suresh Rao 2002-05-31 16:59:25 UTC
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:

Comment 1 Jakub Jelinek 2002-05-31 18:54:15 UTC
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.