Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/goto-cc/gcc_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ static std::string compiler_name(
base_name.find("goto-bcc")!=std::string::npos)
return "bcc";

if(base_name=="goto-clang")
return "clang";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we thus get rid of the #ifdef __FreeBSD__ below?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, unfortunately not -- I'd like that goto-cc (with that basename) will call clang on FreeBSD. I don't see any way of achieving that without the #ifdef.


std::string::size_type pos=base_name.find("goto-gcc");

if(pos==std::string::npos ||
Expand Down Expand Up @@ -564,10 +567,13 @@ int gcc_modet::doit()
config.ansi_c.mode=configt::ansi_ct::flavourt::VISUAL_STUDIO;
debug() << "Enabling Visual Studio syntax" << eom;
}
else if(config.this_operating_system()=="macos")
config.ansi_c.mode = configt::ansi_ct::flavourt::CLANG;
else
config.ansi_c.mode=configt::ansi_ct::flavourt::GCC;
{
if(gcc_version.flavor == gcc_versiont::flavort::CLANG)
config.ansi_c.mode = configt::ansi_ct::flavourt::CLANG;
else
config.ansi_c.mode = configt::ansi_ct::flavourt::GCC;
}

if(compiler.mode==compilet::ASSEMBLE_ONLY)
compiler.object_file_extension="s";
Expand Down