Ticket #352: tt352-disable-ld.patch
File tt352-disable-ld.patch, 4.5 KB (added by rurban, 13 years ago) |
---|
-
t/steps/auto_jit-01.t
5 5 6 6 use strict; 7 7 use warnings; 8 use Test::More tests => 5 0;8 use Test::More tests => 51; 9 9 use Carp; 10 10 use Cwd; 11 11 use File::Path qw( mkpath ); … … 52 52 my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch ); 53 53 mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory"; 54 54 my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} ); 55 is( $step->_check_jitcapability($corejit, $cpuarch, $osname ), 0,55 is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 8), 0, 56 56 "Got expected value for _check_jitcapability(): no core.jit case"); 57 57 58 58 chdir $cwd or croak "Unable to change back to starting directory"; … … 71 71 or croak "Unable to open handle to file for testing"; 72 72 print $FH qq{Hello, JIT\n}; 73 73 close $FH or croak "Unable to close handle to file for testing"; 74 is( $step->_check_jitcapability($corejit, $cpuarch, $osname ), 0,74 is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 8), 0, 75 75 "Got expected value for _check_jitcapability(): no JIT on this architecture case"); 76 76 77 77 chdir $cwd or croak "Unable to change back to starting directory"; … … 92 92 close $FH or croak "Unable to close handle to file for testing"; 93 93 my $orig = $step->{jit_is_working}; 94 94 $step->{jit_is_working} = { $cpuarch => 1 }; 95 is( $step->_check_jitcapability($corejit, $cpuarch, $osname ), 1,95 is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 8), 1, 96 96 "Got expected value for _check_jitcapability(): mock JIT case"); 97 97 $step->{jit_is_working} = $orig; 98 98 … … 114 114 close $FH or croak "Unable to close handle to file for testing"; 115 115 my $orig = $step->{jit_is_working}; 116 116 $step->{jit_is_working} = { $cpuarch => 1 }; 117 is( $step->_check_jitcapability($corejit, $cpuarch, $osname ), 0,117 is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 8), 0, 118 118 "Got expected value for _check_jitcapability(): mock darwin-i386 case"); 119 119 $step->{jit_is_working} = $orig; 120 120 121 121 chdir $cwd or croak "Unable to change back to starting directory"; 122 122 } 123 123 124 { 125 my $tdir = tempdir( CLEANUP => 1 ); 126 chdir $tdir or croak "Unable to change to temporary directory"; 127 my $jitbase = 'foo'; 128 my $cpuarch = 'i386'; 129 my $osname = 'MSWin32'; 130 my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch ); 131 mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory"; 132 my $corejit = File::Spec->catfile( $jitbase, $cpuarch, q{core.jit} ); 133 open my $FH, '>', $corejit 134 or croak "Unable to open handle to file for testing"; 135 print $FH qq{Hello, JIT\n}; 136 close $FH or croak "Unable to close handle to file for testing"; 137 my $orig = $step->{jit_is_working}; 138 $step->{jit_is_working} = { $cpuarch => 1 }; 139 is( $step->_check_jitcapability($corejit, $cpuarch, $osname, 4), 0, 140 "Got expected value for _check_jitcapability(): mock single-float"); 141 $step->{jit_is_working} = $orig; 142 143 chdir $cwd or croak "Unable to change back to starting directory"; 144 } 145 124 146 ########### _handle_asm() ########### 125 147 126 148 { -
config/auto/jit.pm
53 53 54 54 my $cpuarch = $conf->data->get('cpuarch'); 55 55 my $osname = $conf->data->get('osname'); 56 my $nvsize = $conf->data->get('nvsize'); 56 57 57 58 my $jitbase = $self->{jitbase_default}; # base path for jit sources 58 59 … … 62 63 if $verbose; 63 64 64 65 my $jitcapable = 65 $self->_check_jitcapability($corejit, $cpuarch, $osname );66 $self->_check_jitcapability($corejit, $cpuarch, $osname, $nvsize); 66 67 67 68 my $jitarchname = "$cpuarch-$osname"; 68 69 _handle_asm( { … … 148 149 149 150 sub _check_jitcapability { 150 151 my $self = shift; 151 my ($corejit, $cpuarch, $osname ) = @_;152 my ($corejit, $cpuarch, $osname, $nvsize) = @_; 152 153 my $jitcapable = 0; 153 154 if ( -e $corejit ) { 154 155 … … 162 163 $jitcapable = 1; 163 164 } 164 165 166 # Can only jit double. For long double see patch in TT #352. 167 # float not yet planned. 168 if ( $nvsize != 8 ) { 169 $jitcapable = 0; 170 } 171 165 172 # Another exception 166 173 if ( $cpuarch eq 'i386' && $osname eq 'darwin' ) { 167 174 $jitcapable = 0;