Changes in driver/cfa.cc [c9e640e:b32ad080]
- File:
-
- 1 edited
-
driver/cfa.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
rc9e640e rb32ad080 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Feb 10 08:28:09 201913 // Update Count : 2 8112 // Last Modified On : Fri Sep 14 23:02:59 2018 13 // Update Count : 277 14 14 // 15 15 … … 107 107 bool link = true; // linking as well as compiling 108 108 bool verbose = false; // -v flag 109 bool quiet = false; // -quiet flag 110 bool debug = true; // -debug flag 111 bool nolib = false; // -nolib flag 112 bool help = false; // -help flag 109 bool quiet = false; // -quiet flag 110 bool debug = true; // -debug flag 111 bool help = false; // -help flag 113 112 bool CFA_flag = false; // -CFA flag 114 113 bool cpp_flag = false; // -E or -M flag, preprocessor only … … 163 162 debug = true; // strip the debug flag 164 163 } else if ( arg == "-nodebug" ) { 165 debug = false; // strip the debug flag 166 } else if ( arg == "-nolib" ) { 167 nolib = true; // strip the nodebug flag 164 debug = false; // strip the nodebug flag 168 165 } else if ( arg == "-quiet" ) { 169 166 quiet = true; // strip the quiet flag … … 360 357 361 358 string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU); 362 if ( ! m32 && ! m64 ) { 363 if ( arch == "x86" ) { 364 args[nargs] = "-m32"; 365 nargs += 1; 366 } else if ( arch == "x64" ) { 367 args[nargs] = "-m64"; 368 nargs += 1; 369 } // if 370 } // if 371 const char * config = nolib ? "nolib" : (debug ? "debug": "nodebug"); 359 if ( ! m32 && ! m64 && arch == "x86" ) { // no override and 32-bit architecture 360 args[nargs] = "-m32"; 361 nargs += 1; 362 } // if 363 const char * config = debug ? "debug": "nodebug"; 372 364 string libdir = libbase + arch + "-" + config; 373 365 374 if ( ! nolib && !dirExists( libdir ) ) {366 if ( ! dirExists( libdir ) ) { 375 367 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; 376 368 cerr << "Was looking for " << libdir << endl; … … 387 379 nargs += 1; 388 380 389 for ( int i = 0; i < nlibs; i += 1 ) { // copy non-user libraries after all user libraries390 args[nargs] = libs[i];391 nargs += 1;392 } // for393 394 381 if ( link ) { 395 382 args[nargs] = "-Xlinker"; … … 411 398 412 399 // include the cfa library in case it's needed 413 args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str(); 414 nargs += 1; 415 args[nargs] = ( *new string( string("-Wl,-rpath," ) + libdir + (intree ? "/src/.libs" : "")) ).c_str(); 400 args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src" : "")) ).c_str(); 416 401 nargs += 1; 417 402 args[nargs] = "-lcfa"; … … 422 407 nargs += 1; 423 408 args[nargs] = "-lrt"; 424 nargs += 1;425 args[nargs] = "-lm";426 409 nargs += 1; 427 410 } // if … … 498 481 args[nargs] = "-Wno-deprecated"; 499 482 nargs += 1; 500 #ifdef HAVE_CAST_FUNCTION_TYPE501 args[nargs] = "-Wno-cast-function-type";502 nargs += 1;503 #endif // HAVE_CAST_FUNCTION_TYPE504 483 if ( ! std_flag ) { // default c11, if none specified 505 484 args[nargs] = "-std=gnu11"; … … 512 491 args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str(); 513 492 nargs += 1; 493 args[nargs] = "-lm"; 494 nargs += 1; 514 495 } else { 515 496 cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl; 516 497 exit( EXIT_FAILURE ); 517 498 } // if 499 500 for ( int i = 0; i < nlibs; i += 1 ) { // copy non-user libraries after all user libraries 501 args[nargs] = libs[i]; 502 nargs += 1; 503 } // for 518 504 519 505 args[nargs] = NULL; // terminate with NULL
Note:
See TracChangeset
for help on using the changeset viewer.