Changeset dfb7c96 for driver/cfa.cc


Ignore:
Timestamp:
Aug 23, 2018, 6:28:45 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
2a9d12d, bcb14b5
Parents:
9833cae0
Message:

temporary patch to implicitly add -m32 for 32-bit compiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r9833cae0 rdfb7c96  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Aug 23 09:42:47 2018
    13 // Update Count     : 267
     12// Last Modified On : Thu Aug 23 15:41:55 2018
     13// Update Count     : 270
    1414//
    1515
     
    343343                args[nargs] = "-I" CFA_INCDIR;
    344344                nargs += 1;
    345                 if ( ! noincstd_flag ) {                                                        // do not use during build
     345                if ( ! noincstd_flag ) {                                                // do not use during build
    346346                        args[nargs] = "-I" CFA_INCDIR "stdhdr";
    347347                        nargs += 1;
     
    354354                args[nargs] = "-I" TOP_SRCDIR "libcfa/src";
    355355                nargs += 1;
    356                 if ( ! noincstd_flag ) {                                                        // do not use during build
     356                if ( ! noincstd_flag ) {                                                // do not use during build
    357357                        args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr";
    358358                        nargs += 1;
     
    379379        }
    380380
    381         const char * const arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU);
     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
    382386        const char * config = debug ? "debug": "nodebug";
    383387        string libdir = libbase + arch + "-" + config;
    384         if( !dirExists(libdir) ) {
     388
     389        if ( ! dirExists( libdir ) ) {
    385390                cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
    386391                cerr << "Was looking for " << libdir << endl;
    387392                libdir = libbase + arch + "-" + "nolib";
    388         }
    389 
    390         if( !dirExists(libdir) ) {
     393        } // if
     394
     395        if ( ! dirExists( libdir ) ) {
    391396                cerr << argv[0] << " internal error, cannot find prelude directory." << endl;
    392397                cerr << "Was looking for " << libdir << endl;
    393398                exit( EXIT_FAILURE );
    394         }
     399        } // if
    395400
    396401        args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + (intree ? "/prelude" : "")) ).c_str();
Note: See TracChangeset for help on using the changeset viewer.