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 169

Summary: Add support for -fvisibilty=hidden
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 1.2   
Hardware: x86   
OS: Linux   
URL: http://gcc.gnu.org/wiki/Visibility

Description Ryan C. Gordon 2006-03-21 17:47:12 UTC
Newer GCCs have the ability to match what VS.NET does with DLLs: make all non-static symbols unexported unless explicitly requested. This means things like SDL_Init() can be visible outside the DLL, but symbols shared between source files inside SDL don't have to be exposed to the world.

Plus it's faster and makes the binary smaller.

Details here:

http://gcc.gnu.org/wiki/Visibility


We'd have to test for -fvisibility in the configure script, and set DECLSPEC appropriately. It appears to be in the mainline gcc4 (including Apple's branch), but not 3.4 or earlier.

--ryan.
Comment 1 Ryan C. Gordon 2006-03-21 20:28:46 UTC
Fixed in CVS.

--ryan.