@@ -107,8 +107,6 @@ gcc_modet::gcc_modet(
107
107
bool _produce_hybrid_binary):
108
108
goto_cc_modet(_cmdline, _base_name, gcc_message_handler),
109
109
produce_hybrid_binary(_produce_hybrid_binary),
110
- act_as_ld(base_name==" ld" ||
111
- base_name.find(" goto-ld" )!=std::string::npos),
112
110
goto_binary_tmp_suffix(" .goto-cc-saved" ),
113
111
114
112
// Keys are architectures specified in configt::set_arch().
@@ -327,8 +325,6 @@ int gcc_modet::doit()
327
325
}
328
326
329
327
native_tool_name=
330
- act_as_ld ?
331
- linker_name (cmdline, base_name) :
332
328
compiler_name (cmdline, base_name);
333
329
334
330
auto default_verbosity = (cmdline.isset (" Wall" ) || cmdline.isset (" Wextra" )) ?
@@ -346,10 +342,7 @@ int gcc_modet::doit()
346
342
// "-v" a) prints the version and b) increases verbosity.
347
343
// Compilation continues, don't exit!
348
344
349
- if (act_as_ld)
350
- std::cout << " GNU ld version 2.16.91 20050610 (goto-cc " CBMC_VERSION
351
- << " )\n " ;
352
- else if (act_as_bcc)
345
+ if (act_as_bcc)
353
346
std::cout << " bcc: version 0.16.17 (goto-cc " CBMC_VERSION " )\n " ;
354
347
else
355
348
std::cout << " gcc version 3.4.4 (goto-cc " CBMC_VERSION " )\n " ;
@@ -396,14 +389,7 @@ int gcc_modet::doit()
396
389
return EX_OK;
397
390
}
398
391
399
- if (act_as_ld)
400
- {
401
- if (produce_hybrid_binary)
402
- debug () << " LD mode (hybrid)" << eom;
403
- else
404
- debug () << " LD mode" << eom;
405
- }
406
- else if (act_as_bcc)
392
+ if (act_as_bcc)
407
393
{
408
394
if (produce_hybrid_binary)
409
395
debug () << " BCC mode (hybrid)" << eom;
@@ -419,9 +405,7 @@ int gcc_modet::doit()
419
405
}
420
406
421
407
// determine actions to be undertaken
422
- if (act_as_ld)
423
- compiler.mode =compilet::LINK_LIBRARY;
424
- else if (cmdline.isset (' S' ))
408
+ if (cmdline.isset (' S' ))
425
409
compiler.mode =compilet::ASSEMBLE_ONLY;
426
410
else if (cmdline.isset (' c' ))
427
411
compiler.mode =compilet::COMPILE_ONLY;
@@ -438,13 +422,10 @@ int gcc_modet::doit()
438
422
// * preprocessing (-E)
439
423
// * no input files given
440
424
441
- if (act_as_ld)
442
- {
443
- }
444
- else if (cmdline.isset (' M' ) ||
445
- cmdline.isset (" MM" ) ||
446
- cmdline.isset (' E' ) ||
447
- !cmdline.have_infile_arg ())
425
+ if (cmdline.isset (' M' ) ||
426
+ cmdline.isset (" MM" ) ||
427
+ cmdline.isset (' E' ) ||
428
+ !cmdline.have_infile_arg ())
448
429
return run_gcc (compiler); // exit!
449
430
450
431
// get configuration
@@ -820,7 +801,7 @@ int gcc_modet::run_gcc(const compilet &compiler)
820
801
for (const auto &a : cmdline.parsed_argv )
821
802
new_argv.push_back (a.arg );
822
803
823
- if (!act_as_ld && compiler.wrote_object_files ())
804
+ if (compiler.wrote_object_files ())
824
805
{
825
806
// Undefine all __CPROVER macros for the system compiler
826
807
std::map<irep_idt, std::size_t > arities;
@@ -953,7 +934,8 @@ int gcc_modet::gcc_hybrid_binary(compilet &compiler)
953
934
std::string goto_binary=*it+goto_binary_tmp_suffix;
954
935
955
936
if (result==0 )
956
- result = hybrid_binary (native_tool, goto_binary, *it, get_message_handler ());
937
+ result = hybrid_binary (
938
+ native_tool, goto_binary, *it, get_message_handler ());
957
939
}
958
940
959
941
return result;
@@ -1047,10 +1029,6 @@ int gcc_modet::asm_output(
1047
1029
// / display command line help
1048
1030
void gcc_modet::help_mode ()
1049
1031
{
1050
- if (act_as_ld)
1051
- std::cout << " goto-ld understands the options of "
1052
- << " ld plus the following.\n\n " ;
1053
- else
1054
- std::cout << " goto-cc understands the options of "
1055
- << " gcc plus the following.\n\n " ;
1032
+ std::cout << " goto-cc understands the options of "
1033
+ << " gcc plus the following.\n\n " ;
1056
1034
}
0 commit comments