- Timestamp:
- Aug 26, 2019, 4:15:08 PM (5 years ago)
- 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
- Location:
- driver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cc1.cc
r5a43ab8 r417a630 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Aug 26 07:52:19201913 // Update Count : 37 412 // Last Modified On : Mon Aug 26 14:21:22 2019 13 // Update Count : 375 14 14 // 15 15 … … 33 33 34 34 35 static string installlibdir( CFA_LIBDIR ); // fixed location of cc1 and cfa-cpp commands when installed36 35 static string compiler_path( CFA_BACKEND_CC ); // path/name of C compiler 37 36 static bool CFA_flag = false; // -CFA flag 38 37 static bool save_temps = false; // -save-temps flag 39 38 static string o_file; 39 static string bprefix; 40 40 41 41 … … 98 98 } else if ( prefix( val, "-o=" ) ) { // output file for -CFA 99 99 o_file = val.substr( 3 ); 100 } else if ( prefix( val, "-B=" ) ) { // location of cfa-cpp 101 bprefix = val.substr( 3 ); 100 102 } else { 101 103 args[nargs++] = ( *new string( arg.substr( __CFA_FLAGPREFIX__.size() + 4 ) ) ).c_str(); … … 428 430 429 431 if ( fork() == 0 ) { // child runs CFA 430 cargs[0] = ( *new string( installlibdir+ "cfa-cpp" ) ).c_str();432 cargs[0] = ( *new string( bprefix + "cfa-cpp" ) ).c_str(); 431 433 cargs[ncargs++] = cpp_in; 432 434 -
driver/cfa.cc
r5a43ab8 r417a630 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 23 16:27:07201913 // Update Count : 41 112 // Last Modified On : Mon Aug 26 14:25:44 2019 13 // Update Count : 414 14 14 // 15 15 … … 82 82 string heading; // banner printed at start of cfa compilation 83 83 string arg; // current command-line argument during command-line parsing 84 string Bprefix; // path where gcc looks for compiler command steps84 string bprefix; // path where gcc looks for compiler command steps 85 85 string langstd; // language standard 86 86 … … 211 211 } // if 212 212 } else if ( prefix( arg, "-B" ) ) { 213 Bprefix = arg.substr(2); // strip the -B flag214 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(); 215 215 } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) { 216 216 args[nargs++] = argv[i]; // pass argument along … … 370 370 } // if 371 371 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() ); 376 377 } // if 377 378 … … 401 402 args[nargs++] = "-fgnu89-inline"; 402 403 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(); 404 405 } else { 405 406 cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
Note: See TracChangeset
for help on using the changeset viewer.