Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    rb32ad080 rdef9d4e  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 14 23:02:59 2018
    13 // Update Count     : 277
     12// Last Modified On : Tue Jan 15 20:56:03 2019
     13// Update Count     : 280
    1414//
    1515
     
    357357
    358358        string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU);
    359         if ( ! m32 && ! m64 && arch == "x86" ) {                        // no override and 32-bit architecture
    360                 args[nargs] = "-m32";
    361                 nargs += 1;
     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
    362367        } // if
    363368        const char * config = debug ? "debug": "nodebug";
     
    379384        nargs += 1;
    380385
     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
    381391        if ( link ) {
    382392                args[nargs] = "-Xlinker";
     
    398408
    399409                // include the cfa library in case it's needed
    400                 args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src" : "")) ).c_str();
     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();
    401413                nargs += 1;
    402414                args[nargs] = "-lcfa";
     
    407419                nargs += 1;
    408420                args[nargs] = "-lrt";
     421                nargs += 1;
     422                args[nargs] = "-lm";
    409423                nargs += 1;
    410424        } // if
     
    491505                args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();
    492506                nargs += 1;
    493                 args[nargs] = "-lm";
    494                 nargs += 1;
    495507        } else {
    496508                cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
    497509                exit( EXIT_FAILURE );
    498510        } // 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
    504511
    505512        args[nargs] = NULL;                                                                     // terminate with NULL
Note: See TracChangeset for help on using the changeset viewer.