We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1629

Summary: new configure switch to disable the use of pthread_setname_np/pthread_set_name_np
Product: SDL Reporter: Edward Rudd <urkle>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.0   
Hardware: All   
OS: Linux   
Attachments: Path to add new --enable-pthread-naming configure option

Description Edward Rudd 2012-10-27 10:49:56 UTC
Created attachment 979 [details]
Path to add new --enable-pthread-naming configure option

pthread_setname_np was added in glibc 2.12, however for better portability of games I prefer to require no newer than glibc 2.11 in my build system (CentOS/EPEL 6).  However since that system uses 2.12 this one symbol messes with my glibc compatibility.

Currently I simply edit SDL_config.h post configure and build.  So I propose this patch to simplify that process.
Comment 1 Sam Lantinga 2012-10-27 14:30:03 UTC
On Mac OS X we dynamically look up the symbol for that exact reason.  Maybe we can do the same for other platforms?
Comment 2 Edward Rudd 2012-10-27 18:52:52 UTC
Hmm. that makes sense..  Now why wasn't that code shared then??  I'll see about converting the linux code to do the same and see if it flies.
Comment 3 Sam Lantinga 2012-10-30 19:29:49 UTC
Great, let me know what you find! :)
Comment 4 Ryan C. Gordon 2012-11-03 10:23:36 UTC
(In reply to comment #3)
> Great, let me know what you find! :)

(whoops, I replied on the mailing list, didn't realize we were discussing this here already.)

I just pushed a change to make the Linux and Mac OS X code do this. I think we're good here, so I'm closing the bug.

hg changeset 44a2e00e7c66 (and a minor fix in 45187a87d35b).

--ryan.