Bug 65777 - static and shared versions of libpthread built differently
Summary: static and shared versions of libpthread built differently
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libc
Version: 7.2
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-05-31 16:59 UTC by Suresh Rao
Modified: 2008-05-01 15:38 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-15 20:44:18 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.