Changes in driver/cfa.cc [8cbb6aa:09f34a84]
- File:
-
- 1 edited
-
driver/cfa.cc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
r8cbb6aa r09f34a84 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 30 10:47:52 202313 // Update Count : 4 7812 // Last Modified On : Wed Jul 14 21:55:12 2021 13 // Update Count : 467 14 14 // 15 15 … … 44 44 static int flags = 0; 45 45 46 // This allocation 'leaks' memory from the program to the execution47 // environment, as putenv does not manage the storage of the string used48 // as an environment variable. This leak is necessary to ensure the49 // underlying C string is allocated long enough.50 46 if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) { 51 47 cerr << argv[0] << " error, cannot set environment variable." << endl; … … 202 198 } // if 203 199 } else if ( arg == "-CFA" ) { 204 CFA_flag = true; // strip -CFA flag200 CFA_flag = true; // strip the -CFA flag 205 201 link = false; 206 202 args[nargs++] = "-fsyntax-only"; // stop after stage 2 207 203 } else if ( arg == "-debug" ) { 208 debug = true; // strip debug flag204 debug = true; // strip the debug flag 209 205 } else if ( arg == "-nodebug" ) { 210 debug = false; // strip nodebug flag206 debug = false; // strip the nodebug flag 211 207 } else if ( arg == "-quiet" ) { 212 quiet = true; // strip quiet flag208 quiet = true; // strip the quiet flag 213 209 } 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 219 211 } else if ( arg == "-no-include-stdhdr" ) { 220 noincstd_flag = true; // strip no-include-stdhdr flag212 noincstd_flag = true; // strip the no-include-stdhdr flag 221 213 } else if ( arg == "-nolib" ) { 222 nolib = true; // strip nolib flag214 nolib = true; // strip the nolib flag 223 215 } else if ( arg == "-help" ) { 224 help = true; // strip help flag216 help = true; // strip the help flag 225 217 } else if ( arg == "-nohelp" ) { 226 help = false; // strip nohelp flag218 help = false; // strip the nohelp flag 227 219 } else if ( arg == "-cfalib") { 228 220 compiling_libs = true; … … 282 274 } // if 283 275 } else if ( prefix( arg, "-B" ) ) { 284 bprefix = arg.substr(2); // strip -B flag276 bprefix = arg.substr(2); // strip the -B flag 285 277 } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) { 286 278 args[nargs++] = argv[i]; // pass flag along … … 329 321 #endif // __x86_64__ 330 322 331 // ARM -mno-outline-atomics => use LL/SC instead of calls to atomic routines: __aarch64_swp_acq_rel, __aarch64_cas8_acq_rel332 // ARM -march=armv8.2-a+lse => generate Arm LSE extension instructions SWAP and CAS333 // https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10334 #ifdef __ARM_ARCH335 args[nargs++] = "-mno-outline-atomics"; // use ARM LL/SC instructions for atomics336 #endif // __ARM_ARCH337 338 323 #ifdef __DEBUG_H__ 339 324 cerr << "args:"; … … 459 444 460 445 args[nargs++] = "-fexceptions"; // add exception flags (unconditionally) 461 args[nargs++] = "-D_GNU_SOURCE"; // force gnu libraries462 446 463 447 // add flags based on the type of compile
Note:
See TracChangeset
for help on using the changeset viewer.