http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47529
Summary: Visibility attributes not supported on Solaris i386 platform Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: y...@tsoft.com I am porting project to Solaris. Same code that builds fine on Linux/BSD produces warnings on Solaris 10: warning: visibility attribute not supported in this configuration; ignored Compilation of modules succeeds with these warnings. But later linking of those object modules into the shared library fails with this message: ld: fatal: relocation error: R_386_GOTOFF: file /path/to/library/libmine.a(module.o): symbol <some symbol is here>: relocation must bind locally. collect2: ld returned 1 exit status I have built gcc-4.5.2 myself with the same options on both Linux and Solaris. Why wouldn't visibility attributes not be supported in Solaris configuration? Also reading some threads from the past I see that these two messages are somewhat related. Due to the lack of visibility attributes some symbol with R_386_GOTOFF becomes global and can't be linked into the shared library as global. How to solve such problem when c++ code defines some symbols with "hidden" attributes and Solaris version of gcc fails to support this?