[PATCH] -fvisibility problems

Michael Pyne pynm0001 at comcast.net
Wed Nov 17 04:04:02 GMT 2004

On Tuesday 16 November 2004 05:39 pm, Dirk Mueller wrote:
> Well, I'm not sure yet that it is necessary, I think older gcc's can cope
> just fine with unsupported attributes. If not, we can either make the
> configure check use -fvisibility based on the gcc version or create an
> installable kdelibs_config.h that only contains the KDE_EXPORT macro. Not
> sure which variant is best.. I'm not yet convinced that the backportings of
> the -fvisibility stuff in the various vendor compilers is bug free.

I've come across this problem before since Gentoo's GCC 3.4 has the visibility 
patch.  The conclusion I came to then, and which I think still applies now, 
is to only enable the visibility stuff for GCC >3.4.

Distributions with a visibility-enabled GCC 3.4 can patch the appropriate file 
themselves since it's really not very difficult.  Users of CVS using the 
affected compiler can apply the change themselves if they really want it.

This would all be much easier if gcc simply #define'd a variable if the 
visibility feature is enabled, but they didn't, so we can't rely on that. :(

 - Michael Pyne

More information about the kde-core-devel mailing list