Index: parrot-svn/config/init/hints/solaris.pm =================================================================== --- parrot-svn.orig/config/init/hints/solaris.pm 2009-02-18 16:58:21.000000000 +0100 +++ parrot-svn/config/init/hints/solaris.pm 2009-03-02 19:55:40.015625000 +0100 @@ -101,6 +101,23 @@ $conf->data->deltrigger( "gccversion", "solaris_ieee" ); }; $conf->data->settrigger( "gccversion", "solaris_ieee", $solaris_ieee_cb ); + + # Sparc64 Sun Pro cc has a strict default ptr_alignment of 8 + # See TT #364 + my $solaris_memalign_cb = sub { + my ( $key, $gccversion ) = @_; + + if ($gccversion) { + # Don't know how to do this for gcc. + } + elsif ($conf->data->get('byteorder') eq '87654321') { # sun pro cc Sparc64 only + my $linkflags = $conf->data->get('linkflags'); + $conf->data->add( ' ', linkflags => '-xmemalign=4s' ) + unless $linkflags =~ /-xmemalign/; + } + $conf->data->deltrigger( "gccversion", "solaris_memalign" ); + }; + $conf->data->settrigger( "gccversion", "solaris_memalign", $solaris_memalign_cb ); } 1; Index: parrot-svn/config/auto/alignptrs.pm =================================================================== --- parrot-svn.orig/config/auto/alignptrs.pm 2009-02-18 00:01:59.000000000 +0100 +++ parrot-svn/config/auto/alignptrs.pm 2009-03-03 12:22:45.328125000 +0100 @@ -37,7 +37,8 @@ $align = $conf->data->get('ptr_alignment'); $result_str .= "configured: "; } - elsif ( $conf->data->get_p5('OSNAME') eq 'hpux' && $conf->data->get_p5('ccflags') !~ /DD64/ ) { + elsif ( $conf->data->get_p5('OSNAME') eq 'hpux' + && $conf->data->get_p5('ccflags') !~ /DD64/ ) { # HP-UX 10.20/32 hangs in this test. $align = 4; @@ -94,8 +95,16 @@ sub _finalize_result_str { my $self = shift; my ($align, $result_str) = @_; - $result_str .= " $align byte"; - $result_str .= "s" unless $align == 1; + # On 8-byte ptr_alignment we cannot read 4-byte pbc's. Warn the user about it. + # TODO: inform the user to use --64compat for parrot. Milestone v2.6 + if ($align > 4) { + $result_str .= " $align byte"; + $result_str .= "s (Warning: 4-byte pbc's cannot be read!)"; + } + else { + $result_str .= " $align byte"; + $result_str .= "s" unless $align == 1; + } $self->set_result($result_str); }