| [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File ]
STR #1569
Application: | FLTK Library |
Status: | 5 - New |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Unassigned |
Summary: | FLTK is not taking advantage of compiler flags |
Version: | 2.0-feature |
Created By: | gga |
Assigned To: | Unassigned |
Fix Version: | Unassigned |
Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
|
| FLTK is currently not taking proper advantage of compiler flags, and as such, the resulting DSO is bloated with unneeded symbolic information.
makeinclude should be changed to use -fvisibility=hidden and -fvisibility-inlines-hidden.
CXXFLAGS = $(OPTIM) -I/usr/include/freetype2 -O2 -Wall -Wunused -fPIC -I/usr/include/freetype2 -Wno-non-virtual-dtor -Wno-non-virtual -dtor -fvisibility-inlines-hidden # -fvisibility=hidden
-fvisibility-inlines-hidden can be used without modifying the source code. -fvisibility=hidden cannot and requires that each function and class in fltk's source is properly exposed for export (like Windows' use of FL_API's macro of __declspec(dllexport) ). This allows the .so to only expose the symbols for those functions that are to be public to the interface, while keeping all private symbols hidden. This also may have some slight benefit on performance.
For more information, refer to: http://gcc.gnu.org/wiki/Visibility | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |