Default Makefile does not hide symbols

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Default Makefile does not hide symbols

Post by hendu »

The shipped Makefile does not pass -fvisibility=hidden to the build. This means that all symbols are exported, and that the shared lib is some 600kb bigger than it needs to be.

This flag is safe to pass for the static build too, so I recommend adding it unconditionally to CXXFLAGS.
Last edited by hendu on Sat Aug 25, 2012 9:56 am, edited 1 time in total.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Default Makefile does not hide symbols

Post by hendu »

Oh, I see we discussed this before:
http://irrlicht.sourceforge.net/forum/v ... ty#p258438

That old thread is wrong though, you *can* test whether gcc supports an option dynamically. See the kernel's Makefiles (scripts/Kbuild.include, cc-option in particular).
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Default Makefile does not hide symbols

Post by hybrid »

So if you know a configuration that works with Linux gcc, mingw and OSX command line, just provide the patch. Otherwise we have to stay conservative and let this open for local changes.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Default Makefile does not hide symbols

Post by hendu »

I don't have access to a Mac, so that rules out any patch directly?

Personally, I'd just drop support for GCC 3 and default that option on. What platforms need such an old compiler?
Post Reply