Changeset 417a630 for driver/cfa.cc


Ignore:
Timestamp:
Aug 26, 2019, 4:15:08 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
b544afa
Parents:
5a43ab8
Message:

second attempt at moving cfa-cpp to cc1 stage 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r5a43ab8 r417a630  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Aug 23 16:27:07 2019
    13 // Update Count     : 411
     12// Last Modified On : Mon Aug 26 14:25:44 2019
     13// Update Count     : 414
    1414//
    1515
     
    8282        string heading;                                                                         // banner printed at start of cfa compilation
    8383        string arg;                                                                                     // current command-line argument during command-line parsing
    84         string Bprefix;                                                                         // path where gcc looks for compiler command steps
     84        string bprefix;                                                                         // path where gcc looks for compiler command steps
    8585        string langstd;                                                                         // language standard
    8686
     
    211211                                } // if
    212212                        } else if ( prefix( arg, "-B" ) ) {
    213                                 Bprefix = arg.substr(2);                                // strip the -B flag
    214                                 args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
     213                                bprefix = arg.substr(2);                                // strip the -B flag
     214//                              args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + bprefix ) ).c_str();
    215215                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
    216216                                args[nargs++] = argv[i];                                // pass argument along
     
    370370        } // if
    371371
    372         if ( Bprefix.length() == 0 ) {
    373                 Bprefix = ! intree ? installlibdir : srcdriverdir;
    374                 if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/';
    375                 args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
     372        if ( bprefix.length() == 0 ) {
     373                bprefix = ! intree ? installlibdir : srcdriverdir;
     374                if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/';
     375//              args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + bprefix ) ).c_str();
     376                Putenv( argv, ( *new string( string("-B=") + bprefix ) ).c_str() );
    376377        } // if
    377378
     
    401402                args[nargs++] = "-fgnu89-inline";
    402403                args[nargs++] = "-D__int8_t_defined";                   // prevent gcc type-size attributes
    403                 args[nargs++] = ( *new string( string("-B") + Bprefix ) ).c_str();
     404                args[nargs++] = ( *new string( string("-B") + bprefix ) ).c_str();
    404405        } else {
    405406                cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
Note: See TracChangeset for help on using the changeset viewer.