Changeset b544afa


Ignore:
Timestamp:
Aug 30, 2019, 12:50:49 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:
33c849e
Parents:
417a630
Message:

move bprefix to environment variable for cc1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r417a630 rb544afa  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 26 14:25:44 2019
    13 // Update Count     : 414
     12// Last Modified On : Tue Aug 27 06:11:24 2019
     13// Update Count     : 416
    1414//
    1515
     
    6464    struct stat info;
    6565    if ( stat( path.c_str(), &info ) != 0 ) return false;
    66     if ( info.st_mode & S_IFDIR ) return true;
    67         return false;
     66        return (info.st_mode & S_IFDIR) != 0;
    6867} // dirExists
    6968
     
    8281        string heading;                                                                         // banner printed at start of cfa compilation
    8382        string arg;                                                                                     // current command-line argument during command-line parsing
    84         string bprefix;                                                                         // path where gcc looks for compiler command steps
     83        string bprefix;                                                                         // path where gcc looks for compiler steps
    8584        string langstd;                                                                         // language standard
    8685
     
    212211                        } else if ( prefix( arg, "-B" ) ) {
    213212                                bprefix = arg.substr(2);                                // strip the -B flag
    214 //                              args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + bprefix ) ).c_str();
    215213                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
    216214                                args[nargs++] = argv[i];                                // pass argument along
     
    323321                args[nargs++] = "--undefined=__cfaabi_appready_startup";
    324322
    325                 // include the cfa library in case it's needed
     323                // include the cfa library in case it is needed
    326324                args[nargs++] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
    327325                args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
     
    373371                bprefix = ! intree ? installlibdir : srcdriverdir;
    374372                if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/';
    375 //              args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + bprefix ) ).c_str();
    376373                Putenv( argv, ( *new string( string("-B=") + bprefix ) ).c_str() );
    377374        } // if
Note: See TracChangeset for help on using the changeset viewer.