gcc flag on Solaris is -pthreads, not -pthread

VERIFIED FIXED

Status

defect
P3
major
VERIFIED FIXED
19 years ago
11 years ago

People

(Reporter: madams, Assigned: leaf)

Tracking

Trunk
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

On Solaris, the flag for GCC to handle threads natively is -pthreads, _not_
-pthread like on most other platforms. Currently, configure.in only checks for
-pthread when the user specifies --with-pthreads. While this likely works ok
currently due to manually setting the req'd defines and libraries, it is safer
to use the compiler flag if present.

I've attached a patch which checks for -pthreads if the compiler doesn't support
-pthread, and updates the compile flags appropriately
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: cls → leaf
Leaf, could you take a look at this one?  The patch looks mostly right but I
haven't had time to test it.  We probably don't want to fall back to cc if ${CC}
isn't set either.  
what version of gcc uses -pthreads? the version i have on solaris doesn't seem
to support either kind of pthread option (2.7.2.1) (but i don't see the harm in
checking in this change, in any case).
Status: NEW → ASSIGNED
I have 2.95.2 on aesir (sol26) in /opt/gcc if you want to check this against
that version.
I tested the patch and added the same check to NSPR for consistency.  Both
patches have been checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
No longer depends on: 436057
You need to log in before you can comment on or make changes to this bug.