FLTK logo

STR #1569

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]

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:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files


Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 gga
10:51 Jan 23, 2007
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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.