I think this patch fixes the visibility problem with Linux and GCC versions before 4.0. I think it also enables symbol hiding on other platforms with GCC.
-- c
=== config/auto/gcc.pm ================================================================== --- config/auto/gcc.pm (revision 3726) +++ config/auto/gcc.pm (local) @@ -132,6 +132,7 @@ # We shouldn't be using __packed__, but I doubt -Wpacked will harm # us -Wpadded may prove interesting, or even noisy. # -Wunreachable-code might be useful in a non debugging version + 4.0 => "-fvisibility=hidden", ); my @cage_opt_and_vers = ( 0 => @@ -265,6 +266,9 @@ HAS_aligned_funcptr => 1 ); + $conf->data->set( sym_export => '__attribute__ ((visibility("default")))' ) + if $gccversion > 4.0; + $conf->data->set( HAS_aligned_funcptr => 0 ) if $^O eq 'hpux'; === config/init/hints/linux.pm ================================================================== --- config/init/hints/linux.pm (revision 3726) +++ config/init/hints/linux.pm (local) @@ -52,9 +52,6 @@ } } else { - # hide non-exported symbols - $cflags .= ' -fvisibility=hidden'; - if ( $ld_share_flags !~ /-fPIC/ ) { $ld_share_flags .= ' -fPIC'; } @@ -90,7 +87,6 @@ libparrot_shared => 'libparrot$(SHARE_EXT).$(SOVERSION)', libparrot_shared_alias => 'libparrot$(SHARE_EXT)', libparrot_soname => '-Wl,-soname=libparrot$(SHARE_EXT).$(SOVERSION)', - sym_export => '__attribute__ ((visibility("default")))', ); if ( ( split( '-', $Config{archname} ) )[0] eq 'ia64' ) {