@@ -107,8 +107,6 @@ gcc_modet::gcc_modet(
107107 bool _produce_hybrid_binary):
108108 goto_cc_modet(_cmdline, _base_name, gcc_message_handler),
109109 produce_hybrid_binary(_produce_hybrid_binary),
110- act_as_ld(base_name==" ld" ||
111- base_name.find(" goto-ld" )!=std::string::npos),
112110 goto_binary_tmp_suffix(" .goto-cc-saved" ),
113111
114112 // Keys are architectures specified in configt::set_arch().
@@ -327,8 +325,6 @@ int gcc_modet::doit()
327325 }
328326
329327 native_tool_name=
330- act_as_ld ?
331- linker_name (cmdline, base_name) :
332328 compiler_name (cmdline, base_name);
333329
334330 auto default_verbosity = (cmdline.isset (" Wall" ) || cmdline.isset (" Wextra" )) ?
@@ -346,10 +342,7 @@ int gcc_modet::doit()
346342 // "-v" a) prints the version and b) increases verbosity.
347343 // Compilation continues, don't exit!
348344
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)
353346 std::cout << " bcc: version 0.16.17 (goto-cc " CBMC_VERSION " )\n " ;
354347 else
355348 std::cout << " gcc version 3.4.4 (goto-cc " CBMC_VERSION " )\n " ;
@@ -396,14 +389,7 @@ int gcc_modet::doit()
396389 return EX_OK;
397390 }
398391
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)
407393 {
408394 if (produce_hybrid_binary)
409395 debug () << " BCC mode (hybrid)" << eom;
@@ -419,9 +405,7 @@ int gcc_modet::doit()
419405 }
420406
421407 // 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' ))
425409 compiler.mode =compilet::ASSEMBLE_ONLY;
426410 else if (cmdline.isset (' c' ))
427411 compiler.mode =compilet::COMPILE_ONLY;
@@ -438,13 +422,10 @@ int gcc_modet::doit()
438422 // * preprocessing (-E)
439423 // * no input files given
440424
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 ())
448429 return run_gcc (compiler); // exit!
449430
450431 // get configuration
@@ -820,7 +801,7 @@ int gcc_modet::run_gcc(const compilet &compiler)
820801 for (const auto &a : cmdline.parsed_argv )
821802 new_argv.push_back (a.arg );
822803
823- if (!act_as_ld && compiler.wrote_object_files ())
804+ if (compiler.wrote_object_files ())
824805 {
825806 // Undefine all __CPROVER macros for the system compiler
826807 std::map<irep_idt, std::size_t > arities;
@@ -953,7 +934,8 @@ int gcc_modet::gcc_hybrid_binary(compilet &compiler)
953934 std::string goto_binary=*it+goto_binary_tmp_suffix;
954935
955936 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 ());
957939 }
958940
959941 return result;
@@ -1047,10 +1029,6 @@ int gcc_modet::asm_output(
10471029// / display command line help
10481030void gcc_modet::help_mode ()
10491031{
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 " ;
10561034}
0 commit comments