Ticket #1457: remove_cxx.diff

File remove_cxx.diff, 4.7 KB (added by coke, 12 years ago)

patch to remove -cxx option

  • t/steps/init/defaults-01.t

     
    55 
    66use strict; 
    77use warnings; 
    8 use Test::More tests => 39; 
     8use Test::More tests => 37; 
    99use Carp; 
    1010use Cwd; 
    1111use File::Copy; 
     
    8585 
    8686$conf->data->set( archname => 'x86_64' ); 
    8787$conf->data->set( cc => 'cc' ); 
    88 $conf->data->set( cxx => 'c++' ); 
    8988$conf->data->set( link => 'cc' ); 
    9089$conf->data->set( ld => 'env cc' ); 
    9190$conf->data->set( ld_load_flags => '-bundle -L/usr/local/lib64' ); 
     
    9695    "_64_bit_adjustments() returned true"); 
    9796is($conf->data->get( 'archname' ), 'i386', "Got expected value for 'archname'"); 
    9897is($conf->data->get( 'cc' ), 'cc -m32', "Got expected value for 'cc'"); 
    99 is($conf->data->get( 'cxx' ), 'c++ -m32', "Got expected value for 'cxx'"); 
    10098is($conf->data->get( 'link' ), 'cc -m32', "Got expected value for 'link'"); 
    10199is($conf->data->get( 'ld' ), 'env cc -m32', "Got expected value for 'ld'"); 
    102100is($conf->data->get( 'ld_load_flags' ), '-bundle -L/usr/local/lib', 
     
    124122 
    125123$conf->data->set( archname => 'x86_64' ); 
    126124$conf->data->set( cc => 'cc' ); 
    127 $conf->data->set( cxx => 'c++' ); 
    128125$conf->data->set( link => 'cc' ); 
    129126$conf->data->set( ld => 'env cc' ); 
    130127$conf->data->set( ld_load_flags => '-bundle -L/usr/local/lib64' ); 
     
    135132    "_64_bit_adjustments() returned true"); 
    136133is($conf->data->get( 'archname' ), 'x86_64', "Got expected value for 'archname'"); 
    137134is($conf->data->get( 'cc' ), 'cc', "Got expected value for 'cc'"); 
    138 is($conf->data->get( 'cxx' ), 'c++', "Got expected value for 'cxx'"); 
    139135is($conf->data->get( 'link' ), 'cc', "Got expected value for 'link'"); 
    140136is($conf->data->get( 'ld' ), 'env cc', "Got expected value for 'ld'"); 
    141137is($conf->data->get( 'ld_load_flags' ), '-bundle -L/usr/local/lib64', 
  • config/inter/progs.pm

     
    7575    my ($conf, $ask) = @_; 
    7676    # Set each variable individually so that hints files can use them as 
    7777    # triggers to help pick the correct defaults for later answers. 
    78     my ( $cc, $cxx, $link, $ld, $ccflags, $linkflags, $ldflags, $libs, $lex, $yacc ); 
     78    my ( $cc, $link, $ld, $ccflags, $linkflags, $ldflags, $libs, $lex, $yacc ); 
    7979    $cc = integrate( $conf->data->get('cc'), $conf->options->get('cc') ); 
    8080    $cc = prompt( "What C compiler do you want to use?", $cc ) 
    8181        if $ask; 
     
    124124        if $ask; 
    125125    $conf->data->set( libs => $libs ); 
    126126 
    127     $cxx = integrate( $conf->data->get('cxx'), $conf->options->get('cxx') ); 
    128     $cxx = prompt( "What C++ compiler do you want to use?", $cxx ) if $ask; 
    129     $conf->data->set( cxx => $cxx ); 
    130127    return ($conf, $cc); 
    131128} 
    132129 
  • config/init/defaults.pm

     
    102102        # with position-independent code suitable for dynamic loading. 
    103103        cc_shared => $Config{cccdlflags},    # e.g. -fpic for GNU cc. 
    104104 
    105         # C++ compiler -- used to compile parts of ICU.  ICU's configure 
    106         # will try to find a suitable compiler, but it prefers GNU c++ over 
    107         # a system c++, which might not be appropriate.  This setting 
    108         # allows you to override ICU's guess, but is otherwise currently 
    109         # unset.  Ultimately, it should be set to whatever ICU figures 
    110         # out, or parrot should look for it and always tell ICU what to 
    111         # use. 
    112         cxx => 'c++', 
    113  
    114105        # Linker, used to link object files (plus libraries) into 
    115106        # an executable.  It is usually $cc on Unix-ish systems. 
    116107        # VMS and Win32 might use "Link". 
     
    285276            $archname =~ s/x86_64/i386/; 
    286277 
    287278            # adjust gcc? 
    288             for my $cc qw(cc cxx link ld) { 
     279            for my $cc qw(cc link ld) { 
    289280                $conf->data->add( ' ', $cc, '-m32' ); 
    290281            } 
    291282 
  • config/init/hints/irix.pm

     
    2727    $conf->data->set( libs => $libs ); 
    2828 
    2929    my $cc   = $conf->data->get('cc'); 
    30     my $cxx  = $conf->data->get('cxx'); 
    3130    my $ld   = $conf->data->get('ld'); 
    3231    my $link = $conf->data->get('link'); 
    3332    if ( $cc =~ /cc -64/ ) { 
    34         $cxx  = 'CC -64'; 
    3533        $ld   = 'CC -64'; 
    3634        $link = 'CC -64'; 
    3735        $conf->data->set( 
    38             cxx  => $cxx, 
    3936            ld   => $ld, 
    4037            link => $link, 
    4138        );