Skip to content

goto-cc: use result of native compiler detection #2699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2018
Merged
Changes from 1 commit
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
3 changes: 3 additions & 0 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
Member 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