-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Build support for s390x: PAL layer #53287
Conversation
/cc @janvorli |
src/coreclr/pal/src/configure.cmake
Outdated
@@ -1132,7 +1132,7 @@ int main() | |||
}" HAVE_FULLY_FEATURED_PTHREAD_MUTEXES) | |||
set(CMAKE_REQUIRED_LIBRARIES) | |||
|
|||
if(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64) | |||
if(NOT CMAKE_CROSSCOMPILING AND NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never executed while cross compiling, cmake skips all check_*_source_runs during cross compilation. The HAVE_xxx values for cross compilation are taken from the tryrun.cmake file. So this change should not be needed, but you'll need to update the eng/native/tryrun.cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I missed that, sorry. Patch updated accordingly.
Ping? Anything else that needs to be addressed? |
@@ -436,7 +462,7 @@ void CONTEXTToNativeContext(CONST CONTEXT *lpContext, native_context_t *native) | |||
#undef ASSIGN_REG | |||
|
|||
#if !HAVE_FPREGS_WITH_CW | |||
#if HAVE_GREGSET_T || HAVE_GREGSET_T | |||
#if (HAVE_GREGSET_T || HAVE_GREGSET_T) && !defined(HOST_S390X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just noticed this #if has a wrong condition (event before your change). Since you are touching this code, could you please fix it? It should be
#if (HAVE_GREGSET_T || HAVE___GREGSET_T) && !defined(HOST_S390X)
Actually, the related #endif comment need to be updated to match your change (and this fix) to
#endif // HAVE_GREGSET_T || HAVE___GREGSET_T || !HOST_S390X
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -562,7 +592,7 @@ void CONTEXTFromNativeContext(const native_context_t *native, LPCONTEXT lpContex | |||
#undef ASSIGN_REG | |||
|
|||
#if !HAVE_FPREGS_WITH_CW | |||
#if HAVE_GREGSET_T || HAVE___GREGSET_T | |||
#if (HAVE_GREGSET_T || HAVE___GREGSET_T) && !defined(HOST_S390X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the matching @endif comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -448,7 +474,7 @@ void CONTEXTToNativeContext(CONST CONTEXT *lpContext, native_context_t *native) | |||
// whether CONTEXT_FLOATING_POINT is set in the CONTEXT's flags. | |||
return; | |||
} | |||
#endif // HAVE_GREGSET_T || HAVE_GREGSET_T | |||
#endif // (HAVE_GREGSET_T || HAVE___GREGSET_T) && !defined(HOST_S390X) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nit - in the #endif comments, the convention we use is just !HOST_S390X
instead of !defined(HOST_S390X)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Updated.
* Add PAL implementation for Linux on s390x * Define BIGENDIAN on s390x when compiling coreclr * Provide a default HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE value in eng/native/tryrun.cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Hello @janvorli! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Add PAL implementation for Linux on s390x
Define BIGENDIAN on s390x when compiling coreclr
Do not run HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES cmake test when
cross-compiling
Note to reviewers: