Changes in / [381bea6:b7c89aa]
- Files:
-
- 12 deleted
- 4 edited
-
.gitignore (modified) (1 diff)
-
doc/theses/aaron_moss/phd/.gitignore (deleted)
-
doc/theses/aaron_moss/phd/Makefile (deleted)
-
doc/theses/aaron_moss/phd/aaron-thesis.bib (deleted)
-
doc/theses/aaron_moss/phd/background.tex (deleted)
-
doc/theses/aaron_moss/phd/conclusion.tex (deleted)
-
doc/theses/aaron_moss/phd/frontpgs.tex (deleted)
-
doc/theses/aaron_moss/phd/generic-types.tex (deleted)
-
doc/theses/aaron_moss/phd/introduction.tex (deleted)
-
doc/theses/aaron_moss/phd/macros.tex (deleted)
-
doc/theses/aaron_moss/phd/resolution-heuristics.tex (deleted)
-
doc/theses/aaron_moss/phd/thesis.tex (deleted)
-
doc/theses/aaron_moss/phd/type-environment.tex (deleted)
-
driver/as.cc (modified) (2 diffs)
-
driver/cc1.cc (modified) (5 diffs)
-
driver/cfa.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r381bea6 rb7c89aa 56 56 src/Parser/parser.h 57 57 src/Parser/parser.hh 58 src/demangler59 58 60 59 tools/prettyprinter/parser.output -
driver/as.cc
r381bea6 rb7c89aa 10 10 // Created On : Wed Aug 1 10:49:42 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Aug 22 17:30:24201813 // Update Count : 9 312 // Last Modified On : Thu Aug 2 17:50:09 2018 13 // Update Count : 90 14 14 // 15 15 … … 23 23 24 24 //#define __DEBUG_H__ 25 26 #ifdef __DEBUG_H__27 #include <iostream>28 using namespace std;29 #endif // __DEBUG_H__30 25 31 26 int main( const int argc, const char * argv[] ) { -
driver/cc1.cc
r381bea6 rb7c89aa 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 23 09:48:40201813 // Update Count : 1 2212 // Last Modified On : Thu Jul 19 10:46:11 2018 13 // Update Count : 111 14 14 // 15 15 … … 47 47 const string suffixes[NumSuffixes] = { "cfa", "hfa", }; 48 48 49 50 void suffix( string arg, const char * args[], int & nargs ) { 49 bool suffix( string arg ) { 51 50 //std::cerr << arg << std::endl; 52 51 size_t dot = arg.find_last_of( "." ); 53 52 //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl; 54 if ( dot == string::npos ) return ;53 if ( dot == string::npos ) return false; 55 54 string sx = arg.substr( dot + 1 ); 56 55 for ( int i = 0; i < NumSuffixes; i += 1 ) { 57 if ( sx == suffixes[i] ) { 58 args[nargs] = "-x"; 59 nargs += 1; 60 args[nargs] = "c"; 61 nargs += 1; 62 return; 63 } // if 64 } // for 56 if ( sx == suffixes[i] ) return true; 57 } // for 58 return false; 65 59 } // suffix 66 60 67 61 68 void checkEnv( const char * args[], int &nargs ) {62 void checkEnv( const char *args[], int &nargs ) { 69 63 char *value; 70 64 71 value = getenv( "__C FA_COMPILER__" );65 value = getenv( "__COMPILER__" ); 72 66 if ( value != NULL ) { 73 67 compiler_name = value; … … 269 263 270 264 args[0] = compiler_name.c_str(); 271 suffix( cpp_in, args, nargs ); // check suffix272 265 args[nargs] = cpp_in; 273 266 nargs += 1; … … 317 310 318 311 args[0] = compiler_name.c_str(); 319 suffix( cpp_in, args, nargs ); // check suffix 312 if ( suffix( cpp_in ) ) { 313 args[nargs] = "-x"; 314 nargs += 1; 315 args[nargs] = "c"; 316 nargs += 1; 317 } // if 320 318 args[nargs] = cpp_in; // input to cpp 321 319 nargs += 1; … … 356 354 357 355 if ( fork() == 0 ) { // child runs CFA 358 cargs[0] = ( *new string( bprefix + " cfa-cpp" ) ).c_str();356 cargs[0] = ( *new string( bprefix + "/cfa-cpp" ) ).c_str(); 359 357 360 358 // Source file-name used to generate routine names containing global initializations for TU. -
driver/cfa.cc
r381bea6 rb7c89aa 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 23 15:41:55201813 // Update Count : 2 7012 // Last Modified On : Fri Aug 10 18:17:58 2018 13 // Update Count : 259 14 14 // 15 15 … … 43 43 const string suffixes[NumSuffixes] = { "cfa", "hfa", }; 44 44 45 void suffix( string arg, const char * args[], int & nargs) {45 bool suffix( string arg ) { 46 46 //std::cerr << arg << std::endl; 47 47 size_t dot = arg.find_last_of( "." ); 48 48 //std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl; 49 if ( dot == string::npos ) return ;49 if ( dot == string::npos ) return false; 50 50 string sx = arg.substr( dot + 1 ); 51 51 for ( int i = 0; i < NumSuffixes; i += 1 ) { 52 if ( sx == suffixes[i] ) { 53 args[nargs] = "-x"; 54 nargs += 1; 55 args[nargs] = "c"; 56 nargs += 1; 57 return; 58 } // if 52 if ( sx == suffixes[i] ) return true; 59 53 } // for 54 return false; 60 55 } // suffix 61 56 … … 91 86 string Major( str( CFA_VERSION_MAJOR ) ), Minor( str( CFA_VERSION_MINOR ) ), Patch( str( CFA_VERSION_PATCH ) ); 92 87 93 string installincdir( CFA_INCDIR ); // fixed location of include files94 string installlibdir( CFA_LIBDIR ); // fixed location of cc1 and cfa-cpp commands when installed95 string srcdriverdir ( TOP_BUILDDIR "driver"); // fixed location of cc1 and cfa-cpp commands when in tree88 string installincdir( CFA_INCDIR ); // fixed location of include files 89 string installlibdir( CFA_LIBDIR ); // fixed location of cc1 and cfa-cpp commands when installed 90 string srcdriverdir ( TOP_BUILDDIR "driver"); // fixed location of cc1 and cfa-cpp commands when in tree 96 91 97 92 string heading; // banner printed at start of cfa compilation … … 183 178 if ( i == argc ) continue; // next argument available ? 184 179 compiler_path = argv[i]; 185 if ( putenv( (char *)( *new string( string( "__ CFA_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) {180 if ( putenv( (char *)( *new string( string( "__U_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) { 186 181 cerr << argv[0] << " error, cannot set environment variable." << endl; 187 182 exit( EXIT_FAILURE ); … … 299 294 } else { 300 295 bool opt = false; 301 if ( ! xflag ) { 302 suffix( arg, args, nargs ); // check suffix 296 if ( ! xflag && suffix( arg ) ) { 297 args[nargs] = "-x"; 298 nargs += 1; 299 args[nargs] = "c"; 300 nargs += 1; 303 301 // args[nargs] = ( *new string( string("-D__GCC_X__=c") ) ).c_str(); // add the argument for -x 304 302 // nargs += 1; … … 343 341 args[nargs] = "-I" CFA_INCDIR; 344 342 nargs += 1; 345 if ( ! noincstd_flag ) { // do not use during build346 args[nargs] = "-I" CFA_INCDIR " stdhdr";343 if ( ! noincstd_flag ) { // do not use during build 344 args[nargs] = "-I" CFA_INCDIR "/stdhdr"; 347 345 nargs += 1; 348 346 } // if 349 args[nargs] = "-I" CFA_INCDIR " concurrency";350 nargs += 1; 351 args[nargs] = "-I" CFA_INCDIR " containers";347 args[nargs] = "-I" CFA_INCDIR "/concurrency"; 348 nargs += 1; 349 args[nargs] = "-I" CFA_INCDIR "/containers"; 352 350 nargs += 1; 353 351 } else { 354 352 args[nargs] = "-I" TOP_SRCDIR "libcfa/src"; 355 353 nargs += 1; 356 if ( ! noincstd_flag ) { // do not use during build354 if ( ! noincstd_flag ) { // do not use during build 357 355 args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr"; 358 356 nargs += 1; … … 379 377 } 380 378 381 string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU); 382 if ( ! m32 && ! m64 && arch == "x86" ) { // no override and 32-bit architecture 383 args[nargs] = "-m32"; 384 nargs += 1; 385 } // if 379 const char * const arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU); 386 380 const char * config = debug ? "debug": "nodebug"; 387 381 string libdir = libbase + arch + "-" + config; 388 389 if ( ! dirExists( libdir ) ) { 382 if( !dirExists(libdir) ) { 390 383 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; 391 384 cerr << "Was looking for " << libdir << endl; 392 385 libdir = libbase + arch + "-" + "nolib"; 393 } // if394 395 if ( ! dirExists( libdir) ) {386 } 387 388 if( !dirExists(libdir) ) { 396 389 cerr << argv[0] << " internal error, cannot find prelude directory." << endl; 397 390 cerr << "Was looking for " << libdir << endl; 398 391 exit( EXIT_FAILURE ); 399 } // if392 } 400 393 401 394 args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + (intree ? "/prelude" : "")) ).c_str(); … … 477 470 478 471 if ( Bprefix.length() == 0 ) { 479 Bprefix = ! intree ? installlibdir : srcdriverdir; 480 if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/'; 472 Bprefix = !intree ? installlibdir : srcdriverdir; 481 473 args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str(); 482 474 nargs += 1; … … 512 504 args[nargs] = "-D__int8_t_defined"; // prevent gcc type-size attributes 513 505 nargs += 1; 514 args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();506 args[nargs] = ( *new string( string("-B") + Bprefix + "/" ) ).c_str(); 515 507 nargs += 1; 516 508 args[nargs] = "-lm";
Note:
See TracChangeset
for help on using the changeset viewer.