Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    rdef9d4e rb32ad080  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Jan 15 20:56:03 2019
    13 // Update Count     : 280
     12// Last Modified On : Fri Sep 14 23:02:59 2018
     13// Update Count     : 277
    1414//
    1515
     
    357357
    358358        string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU);
    359         if ( ! m32 && ! m64 ) {
    360                 if ( arch == "x86" ) {
    361                         args[nargs] = "-m32";
    362                         nargs += 1;
    363                 } else if ( arch == "x64" ) {
    364                         args[nargs] = "-m64";
    365                         nargs += 1;
    366                 }  // if
     359        if ( ! m32 && ! m64 && arch == "x86" ) {                        // no override and 32-bit architecture
     360                args[nargs] = "-m32";
     361                nargs += 1;
    367362        } // if
    368363        const char * config = debug ? "debug": "nodebug";
     
    384379        nargs += 1;
    385380
    386         for ( int i = 0; i < nlibs; i += 1 ) {                          // copy non-user libraries after all user libraries
    387                 args[nargs] = libs[i];
    388                 nargs += 1;
    389         } // for
    390 
    391381        if ( link ) {
    392382                args[nargs] = "-Xlinker";
     
    408398
    409399                // include the cfa library in case it's needed
    410                 args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
    411                 nargs += 1;
    412                 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();
    413401                nargs += 1;
    414402                args[nargs] = "-lcfa";
     
    419407                nargs += 1;
    420408                args[nargs] = "-lrt";
    421                 nargs += 1;
    422                 args[nargs] = "-lm";
    423409                nargs += 1;
    424410        } // if
     
    505491                args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();
    506492                nargs += 1;
     493                args[nargs] = "-lm";
     494                nargs += 1;
    507495        } else {
    508496                cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
    509497                exit( EXIT_FAILURE );
    510498        } // 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
    511504
    512505        args[nargs] = NULL;                                                                     // terminate with NULL
Note: See TracChangeset for help on using the changeset viewer.