Ticket #352: tt352-disable-ld.patch

File tt352-disable-ld.patch, 4.5 KB (added by rurban, 13 years ago)

until it is fixed, disable jit with long double

  • t/steps/auto_jit-01.t

     
    55 
    66use strict; 
    77use warnings; 
    8 use Test::More tests =>  50; 
     8use Test::More tests =>  51; 
    99use Carp; 
    1010use Cwd; 
    1111use File::Path qw( mkpath ); 
     
    5252    my $corejitdir = File::Spec->catdir ( $jitbase, $cpuarch ); 
    5353    mkpath( $corejitdir, 0, 755 ) or croak "Unable to make testing directory"; 
    5454    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, 
    5656        "Got expected value for _check_jitcapability(): no core.jit case"); 
    5757 
    5858    chdir $cwd or croak "Unable to change back to starting directory"; 
     
    7171        or croak "Unable to open handle to file for testing"; 
    7272    print $FH qq{Hello, JIT\n}; 
    7373    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, 
    7575        "Got expected value for _check_jitcapability(): no JIT on this architecture case"); 
    7676 
    7777    chdir $cwd or croak "Unable to change back to starting directory"; 
     
    9292    close $FH or croak "Unable to close handle to file for testing"; 
    9393    my $orig = $step->{jit_is_working}; 
    9494    $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, 
    9696        "Got expected value for _check_jitcapability(): mock JIT case"); 
    9797    $step->{jit_is_working} = $orig; 
    9898 
     
    114114    close $FH or croak "Unable to close handle to file for testing"; 
    115115    my $orig = $step->{jit_is_working}; 
    116116    $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, 
    118118        "Got expected value for _check_jitcapability(): mock darwin-i386 case"); 
    119119    $step->{jit_is_working} = $orig; 
    120120 
    121121    chdir $cwd or croak "Unable to change back to starting directory"; 
    122122} 
    123123 
     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 
    124146########### _handle_asm() ########### 
    125147 
    126148{ 
  • config/auto/jit.pm

     
    5353 
    5454    my $cpuarch     = $conf->data->get('cpuarch'); 
    5555    my $osname      = $conf->data->get('osname'); 
     56    my $nvsize      = $conf->data->get('nvsize'); 
    5657 
    5758    my $jitbase  = $self->{jitbase_default};   # base path for jit sources 
    5859 
     
    6263        if $verbose; 
    6364 
    6465    my $jitcapable = 
    65         $self->_check_jitcapability($corejit, $cpuarch, $osname); 
     66        $self->_check_jitcapability($corejit, $cpuarch, $osname, $nvsize); 
    6667 
    6768    my $jitarchname = "$cpuarch-$osname"; 
    6869    _handle_asm( { 
     
    148149 
    149150sub _check_jitcapability { 
    150151    my $self = shift; 
    151     my ($corejit, $cpuarch, $osname) = @_; 
     152    my ($corejit, $cpuarch, $osname, $nvsize) = @_; 
    152153    my $jitcapable = 0; 
    153154    if ( -e $corejit ) { 
    154155 
     
    162163            $jitcapable = 1; 
    163164        } 
    164165 
     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 
    165172        # Another exception 
    166173        if ( $cpuarch eq 'i386' && $osname eq 'darwin' ) { 
    167174            $jitcapable = 0;