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

patch flang runtime library #980

Merged
merged 3 commits into from
Mar 31, 2021

Conversation

xoviat
Copy link
Collaborator

@xoviat xoviat commented Jan 28, 2021

patch the runtime library so that it works on windows.

@@ -102,5 +104,8 @@ void __fort_gethostname(host) char *host;
}
p = un.nodename;
}
#else
strcpy(p, "localhost");
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should be an equivalent for gethostname in the Win32 or Winsock API, right?

Can you keep the support for -curhost on Windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is, but I haven't put it in yet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that should be good for now; I will add support for this later.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Will add TODO in a separate patch.

@xoviat xoviat requested a review from kaadam January 28, 2021 19:20
@xoviat
Copy link
Collaborator Author

xoviat commented Feb 8, 2021

@kaadam Are you going to look at this?

runtime/include/mthdecls.h Outdated Show resolved Hide resolved
runtime/flang/hand.c Outdated Show resolved Hide resolved
runtime/flang/mmcmplx16.c Outdated Show resolved Hide resolved
runtime/flang/chdir3f.c Show resolved Hide resolved
runtime/flang/getpid3f.c Outdated Show resolved Hide resolved
runtime/flang/hand.c Show resolved Hide resolved
runtime/flang/stat_linux.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@kaadam kaadam left a comment

Choose a reason for hiding this comment

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

LGTM, nit: Could you add a description about what you have done this patch? Thanks.

@pawosm-arm
Copy link
Collaborator

Could you squash those 18 commits into one?

@xoviat
Copy link
Collaborator Author

xoviat commented Feb 10, 2021

@pawosm-arm do I need feedback from shivaramaarao first? Or do you have write access?

@kiranchandramohan
Copy link
Collaborator

@shivaramaarao has to approve for the x86_64/amd64 platform. @pawosm-arm, @bryanpkc or myself can approve for aarch64.

@xoviat
Copy link
Collaborator Author

xoviat commented Feb 10, 2021

I'll wait until he approves, then squash them.

* modify function so that they work
  on windows.
* add OMP alias to forward fortran
 OMP calls to c library
@kaadam
Copy link
Collaborator

kaadam commented Mar 9, 2021

@bryanpkc @shivaramaarao @kiranchandramohan Could you please take a look at this PR? Thanks in advance!

runtime/include/mthdecls.h Outdated Show resolved Hide resolved
runtime/include/mthdecls.h Outdated Show resolved Hide resolved
@xoviat
Copy link
Collaborator Author

xoviat commented Mar 20, 2021

@kiranchandramohan is there any chance that this will be merged soon?

@xoviat xoviat mentioned this pull request Mar 25, 2021
Copy link
Collaborator

@kiranchandramohan kiranchandramohan left a comment

Choose a reason for hiding this comment

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

A few quick comments.

runtime/flang/xfer_heap_dum.c Show resolved Hide resolved
runtime/flang/alias.c Outdated Show resolved Hide resolved
runtime/flang/async.c Show resolved Hide resolved
runtime/flang/buffer.c Show resolved Hide resolved
runtime/flang/heapinit.c Show resolved Hide resolved
runtime/include/mthdecls.h Show resolved Hide resolved
runtime/flang/stat_linux.c Show resolved Hide resolved
@kiranchandramohan
Copy link
Collaborator

I will run a few tests tomorrow and if OK will accept. Does @bryanpkc have further comments?

Copy link
Collaborator

@kiranchandramohan kiranchandramohan left a comment

Choose a reason for hiding this comment

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

I would like to merge this PR before this Wednesday's general Flang call if there are no further comments.

@kiranchandramohan
Copy link
Collaborator

As per the new pull request policy, we only need 2 reviewers (1 windows + 1 other) to review and approve windows PRs. This patch meets the criteria and hence can be merged if the CI is passing.

Thanks @xoviat for working on this patch.

https://github.com/flang-compiler/flang/wiki/Community#the-pull-request-process

@kiranchandramohan kiranchandramohan merged commit b364e30 into flang-compiler:master Mar 31, 2021
@bryanpkc
Copy link
Collaborator

Sorry I missed the messages on this PR. Thanks for merging @kiranchandramohan.

@xoviat xoviat deleted the windows-working-2 branch March 31, 2021 14:43
@bryanpkc
Copy link
Collaborator

@xoviat For future reference please following the coding convention and use 2-space indents.

@kaadam kaadam added the windows Add this to all windows specific issues or PRs label Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Add this to all windows specific issues or PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants