Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r8cbb6aa r09f34a84  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 30 10:47:52 2023
    13 // Update Count     : 478
     12// Last Modified On : Wed Jul 14 21:55:12 2021
     13// Update Count     : 467
    1414//
    1515
     
    4444        static int flags = 0;
    4545
    46     // This allocation 'leaks' memory from the program to the execution
    47     // environment, as putenv does not manage the storage of the string used
    48     // as an environment variable. This leak is necessary to ensure the
    49     // underlying C string is allocated long enough.
    5046        if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) {
    5147                cerr << argv[0] << " error, cannot set environment variable." << endl;
     
    202198                                } // if
    203199                        } else if ( arg == "-CFA" ) {
    204                                 CFA_flag = true;                                                // strip -CFA flag
     200                                CFA_flag = true;                                                // strip the -CFA flag
    205201                                link = false;
    206202                                args[nargs++] = "-fsyntax-only";                // stop after stage 2
    207203                        } else if ( arg == "-debug" ) {
    208                                 debug = true;                                                   // strip debug flag
     204                                debug = true;                                                   // strip the debug flag
    209205                        } else if ( arg == "-nodebug" ) {
    210                                 debug = false;                                                  // strip nodebug flag
     206                                debug = false;                                                  // strip the nodebug flag
    211207                        } else if ( arg == "-quiet" ) {
    212                                 quiet = true;                                                   // strip quiet flag
     208                                quiet = true;                                                   // strip the quiet flag
    213209                        } else if ( arg == "-noquiet" ) {
    214                                 quiet = false;                                                  // strip noquiet flag
    215                         } else if ( arg == "-invariant" ) {
    216                                 Putenv( argv, "-" + arg );
    217                         } else if ( arg == "--invariant" ) {
    218                                 Putenv( argv, arg );
     210                                quiet = false;                                                  // strip the noquiet flag
    219211                        } else if ( arg == "-no-include-stdhdr" ) {
    220                                 noincstd_flag = true;                                   // strip no-include-stdhdr flag
     212                                noincstd_flag = true;                                   // strip the no-include-stdhdr flag
    221213                        } else if ( arg == "-nolib" ) {
    222                                 nolib = true;                                                   // strip nolib flag
     214                                nolib = true;                                                   // strip the nolib flag
    223215                        } else if ( arg == "-help" ) {
    224                                 help = true;                                                    // strip help flag
     216                                help = true;                                                    // strip the help flag
    225217                        } else if ( arg == "-nohelp" ) {
    226                                 help = false;                                                   // strip nohelp flag
     218                                help = false;                                                   // strip the nohelp flag
    227219                        } else if ( arg == "-cfalib") {
    228220                                compiling_libs = true;
     
    282274                                } // if
    283275                        } else if ( prefix( arg, "-B" ) ) {
    284                                 bprefix = arg.substr(2);                                // strip -B flag
     276                                bprefix = arg.substr(2);                                // strip the -B flag
    285277                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
    286278                                args[nargs++] = argv[i];                                // pass flag along
     
    329321        #endif // __x86_64__
    330322
    331         // ARM -mno-outline-atomics => use LL/SC instead of calls to atomic routines: __aarch64_swp_acq_rel, __aarch64_cas8_acq_rel
    332         // ARM -march=armv8.2-a+lse => generate Arm LSE extension instructions SWAP and CAS
    333         // https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10
    334         #ifdef __ARM_ARCH
    335         args[nargs++] = "-mno-outline-atomics";                         // use ARM LL/SC instructions for atomics
    336         #endif // __ARM_ARCH
    337 
    338323        #ifdef __DEBUG_H__
    339324        cerr << "args:";
     
    459444
    460445        args[nargs++] = "-fexceptions";                                         // add exception flags (unconditionally)
    461         args[nargs++] = "-D_GNU_SOURCE";                                        // force gnu libraries
    462446
    463447        // add flags based on the type of compile
Note: See TracChangeset for help on using the changeset viewer.