Changeset e3215c5


Ignore:
Timestamp:
May 13, 2018, 8:28:32 AM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
a83d08b
Parents:
a8de0f4
Message:

add gcc -x flag

Location:
src/driver
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/driver/cc1.cc

    ra8de0f4 re3215c5  
    1010// Created On       : Fri Aug 26 14:23:51 2005
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 18 08:14:21 2017
    13 // Update Count     : 81
     12// Last Modified On : Sat May 12 16:11:53 2018
     13// Update Count     : 94
    1414//
    1515
     
    3232string compiler_name( CFA_BACKEND_CC );                                 // path/name of C compiler
    3333
     34string D__GCC_X__( "-D__GCC_X__=" );
    3435string D__GCC_BPREFIX__( "-D__GCC_BPREFIX__=" );
    3536string D__CFA_FLAGPREFIX__( "-D__CFA_FLAG__=" );
     
    162163                                cargs[ncargs] = ( *new string( string( argv[i + 1] ).substr( D__CFA_FLAGPREFIX__.size() - 2 ) ) ).c_str();
    163164                                ncargs += 1;
     165                                i += 1;                                                                 // and the argument
     166                        } else if ( prefix( arg, D__GCC_X__ ) ) {
     167                                args[nargs] = "-x";
     168                                nargs += 1;
     169                                args[nargs] = ( *new string( arg.substr( D__GCC_X__.size() ) ) ).c_str(); // pass the flag along
     170                                nargs += 1;
     171                        } else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_X__.substr(2) ) ) {
     172                                args[nargs] = "-x";
     173                                nargs += 1;
     174                                args[nargs] = ( *new string( string( argv[i + 1] ).substr( D__GCC_X__.size() - 2 ) ) ).c_str(); // pass the flag along
     175                                nargs += 1;
    164176                                i += 1;                                                                 // and the argument
    165177                        } else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
  • src/driver/cfa.cc

    ra8de0f4 re3215c5  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May  2 17:57:43 2018
    13 // Update Count     : 224
     12// Last Modified On : Sat May 12 17:07:53 2018
     13// Update Count     : 240
    1414//
    1515
     
    158158                                args[nargs] = argv[i];                                  // pass the argument along
    159159                                nargs += 1;
    160                         } else if ( prefix( arg, "-std=" ) ) {
     160                        } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
    161161                                std_flag = true;                                                // -std=XX provided
    162162                                args[nargs] = argv[i];                                  // pass the argument along
     163                                nargs += 1;
     164                        } else if ( arg == "-x" ) {                                     // lost so force along
     165                                args[nargs] = argv[i];                                  // pass the argument along
     166                                nargs += 1;
     167                                i += 1;                                                                 // advance to argument
     168                                args[nargs] = argv[i];                                  // pass the argument along
     169                                nargs += 1;
     170                                args[nargs] = ( *new string( string("-D__GCC_X__=") + argv[i] ) ).c_str(); // add the argument for -x
     171                                nargs += 1;
     172                        } else if ( prefix( arg, "-x" ) ) {                     // lost so force along
     173                                args[nargs] = argv[i];                                  // pass the argument along
     174                                nargs += 1;
     175                                args[nargs] = ( *new string( string("-D__GCC_X__=") + arg.substr(2) ) ).c_str(); // add the argument for -x
    163176                                nargs += 1;
    164177                        } else if ( arg == "-w" ) {
     
    240253        } // for
    241254
     255//    if ( MACHINE_TYPE == "x86_64" ) {
     256//              args[nargs] = "-mcx16";                                                 // allow double-wide CAA
     257//              nargs += 1;
     258//    } // if
     259
    242260#ifdef __DEBUG_H__
    243261        cerr << "args:";
     
    268286        if ( link ) {
    269287                #if ! defined(HAVE_LIBCFA_RELEASE)
    270                         if( !debug ) {
     288                        if ( ! debug ) {
    271289                                cerr << "error: Option -nodebug is unavailable, libcfa was not installed." << endl;
    272290                                exit( EXIT_FAILURE );
    273                                 }
     291                        } // if
    274292                #endif
    275293                #if ! defined(HAVE_LIBCFA_DEBUG)
    276                         if( debug ) {
     294                        if ( debug ) {
    277295                                cerr << "error: Option -debug is unavailable, libcfa-d was not installed." << endl;
    278296                                exit( EXIT_FAILURE );
    279                                 }
     297                        } // if
    280298                #endif
    281299
     
    292310                args[nargs] = "-L" CFA_LIBDIR;
    293311                nargs += 1;
    294                 if( debug ) {
     312                if ( debug ) {
    295313                        args[nargs] = "-lcfa-d";
    296314                } else {
    297315                        args[nargs] = "-lcfa";
    298                 }
     316                } // if
    299317                nargs += 1;
    300318                args[nargs] = "-lpthread";
Note: See TracChangeset for help on using the changeset viewer.