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 - Add support for -fvisibilty=hidden
Summary: Add support for -fvisibilty=hidden
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 1.2
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL: http://gcc.gnu.org/wiki/Visibility
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-21 17:47 UTC by Ryan C. Gordon
Modified: 2006-03-21 20:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.