Skip to content
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

Systems without gcc (only clang) cannot build flang #513

Closed
wants to merge 3 commits into from
Closed

Systems without gcc (only clang) cannot build flang #513

wants to merge 3 commits into from

Conversation

ibara
Copy link

@ibara ibara commented Jun 25, 2018

Hi --

There's a peculiar bit of the flang compile process where a pair of .F95 files are run through the C preprocessor.

When clang is the C compiler being used, clang silently passes the handling of this preprocessor step to gcc. On systems where clang is the only C compiler available (such as OpenBSD/arm64 by default), this causes the build to fail. I'm not sure why gcc doesn't mind using the C preprocessor to handle .F95 files but that's a different issue.

I'm not certain that passing .F95 files through the C preprocessor is necessarily what is intended here, but this small fix allows systems that have only clang to build flang. This lets flang build and run successfully on OpenBSD/arm64. It should be a no-op with gcc.

Thanks.

@gklimowicz
Copy link
Contributor

Brian, can you do us the favor of executing an individual contributor license agreement? NVIDIA is requiring that we get these before accepting patches from new contributors (regardless of how small the patch is).

Let me know if you have any questions.

Pointers to the CLAs can be found on the Wiki page for the Flang Community: https://github.com/flang-compiler/flang/wiki/Community

@ibara
Copy link
Author

ibara commented Jun 28, 2018

Sure. I can get it to you tomorrow.

@ibara
Copy link
Author

ibara commented Jun 29, 2018

Sorry for the delay; just submitted the completed CLA.

@ibara
Copy link
Author

ibara commented Jul 24, 2018

As noted on the Slack, we can just use flang -E directly for this.

This reverts commit 19f373d.

There is a bootstrapping problem here; if you don't have flang1
installed, you cannot use flang -E.
@ibara
Copy link
Author

ibara commented Jul 24, 2018

Apologies for the noise, but it turns out we can't use flang -E. If you don't already have flang1 installed, you can't use flang -E, so there's a bootstrapping problem.

Probably best at this point just to close this, and if this change is desired, pull it in with #521.

@gklimowicz
Copy link
Contributor

Closing per ibara.

@gklimowicz gklimowicz closed this Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants