Changeset ff29f08 for src/driver


Ignore:
Timestamp:
May 18, 2018, 2:09:21 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
2472a19
Parents:
f6f0cca3 (diff), c7d8100c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/master' into with_gc

Location:
src/driver
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/driver/Makefile.am

    rf6f0cca3 rff29f08  
    1111## Created On       : Sun May 31 08:49:31 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Fri Oct 28 13:46:06 2016
    14 ## Update Count     : 10
     13## Last Modified On : Mon Apr 30 17:44:17 2018
     14## Update Count     : 11
    1515###############################################################################
    1616
    1717# applies to both programs
    18 AM_CXXFLAGS = -Wall -O2 -g -std=c++14
     18AM_CXXFLAGS = -Wall -O2 -g -std=c++14 -I${abs_top_srcdir}/src
    1919if BUILD_NO_LIB
    2020else
  • src/driver/Makefile.in

    rf6f0cca3 rff29f08  
    294294
    295295# applies to both programs
    296 AM_CXXFLAGS = -Wall -O2 -g -std=c++14 $(am__append_1) $(am__append_2) \
    297         $(am__append_3)
     296AM_CXXFLAGS = -Wall -O2 -g -std=c++14 -I${abs_top_srcdir}/src \
     297        $(am__append_1) $(am__append_2) $(am__append_3)
    298298cfa_SOURCES = cfa.cc
    299299
  • src/driver/cc1.cc

    rf6f0cca3 rff29f08  
    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

    rf6f0cca3 rff29f08  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Feb  5 22:05:28 2018
    13 // Update Count     : 166
     12// Last Modified On : Mon May 14 14:16:33 2018
     13// Update Count     : 244
    1414//
    1515
     
    1919#include <unistd.h>                                                                             // execvp
    2020#include <string>                                                                               // STL version
    21 
     21#include <string.h>                                                                             // strcmp
     22
     23#include "Common/SemanticError.h"
    2224#include "config.h"                                                                             // configure info
    2325
     
    156158                                args[nargs] = argv[i];                                  // pass the argument along
    157159                                nargs += 1;
    158                         } else if ( prefix( arg, "-std=" ) ) {
     160                        } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
    159161                                std_flag = true;                                                // -std=XX provided
    160162                                args[nargs] = argv[i];                                  // pass the argument along
    161163                                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
     176                                nargs += 1;
     177                        } else if ( arg == "-w" ) {
     178                                args[nargs] = argv[i];                                  // pass the argument along
     179                                nargs += 1;
     180                                args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
     181                                nargs += 1;
     182                        } else if ( prefix( arg, "-W" ) ) {                     // check before next tests
     183                                if ( arg == "-Werror" || arg == "-Wall" ) {
     184                                        args[nargs] = argv[i];                          // pass the argument along
     185                                        nargs += 1;
     186                                        args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
     187                                        nargs += 1;
     188                                } else {
     189                                        unsigned int adv = prefix( arg, "-Wno-" ) ? 5 : 2;
     190                                        args[nargs] = argv[i];                          // conditionally pass the argument along
     191                                        const char * warning = argv[i] + adv;     // extract warning
     192                                        if ( SemanticWarning_Exist( warning ) ) { // replace the argument for cfa-cpp
     193                                                args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str();
     194                                        } // if
     195                                        nargs += 1;
     196                                } // if
    162197                        } else if ( prefix( arg, "-B" ) ) {
    163198                                Bprefix = arg.substr(2);                                // strip the -B flag
     
    218253        } // for
    219254
     255#ifdef __x86_64__
     256        args[nargs] = "-mcx16";                                                         // allow double-wide CAA
     257        nargs += 1;
     258#endif // __x86_64__
     259
    220260#ifdef __DEBUG_H__
    221261        cerr << "args:";
     
    246286        if ( link ) {
    247287                #if ! defined(HAVE_LIBCFA_RELEASE)
    248                         if( !debug ) {
    249                                 cerr << "error: Option -nodebug is not available, libcfa was not installed." << endl;
     288                        if ( ! debug ) {
     289                                cerr << "error: Option -nodebug is unavailable, libcfa was not installed." << endl;
    250290                                exit( EXIT_FAILURE );
    251                                 }
     291                        } // if
    252292                #endif
    253293                #if ! defined(HAVE_LIBCFA_DEBUG)
    254                         if( debug ) {
    255                                 cerr << "error: Option -debug is not available, libcfa-d was not installed." << endl;
     294                        if ( debug ) {
     295                                cerr << "error: Option -debug is unavailable, libcfa-d was not installed." << endl;
    256296                                exit( EXIT_FAILURE );
    257                                 }
     297                        } // if
    258298                #endif
    259299
     
    270310                args[nargs] = "-L" CFA_LIBDIR;
    271311                nargs += 1;
    272                 if( debug ) {
     312                if ( debug ) {
    273313                        args[nargs] = "-lcfa-d";
    274314                } else {
    275315                        args[nargs] = "-lcfa";
    276                 }
     316                } // if
    277317                nargs += 1;
    278318                args[nargs] = "-lpthread";
     
    355395                args[nargs] = "-Wno-deprecated";
    356396                nargs += 1;
    357                 if ( ! std_flag ) {                                                             // default c99, if none specified
    358                         args[nargs] = "-std=gnu99";
     397                if ( ! std_flag ) {                                                             // default c11, if none specified
     398                        args[nargs] = "-std=gnu11";
    359399                        nargs += 1;
    360400                } // if
Note: See TracChangeset for help on using the changeset viewer.