Conversation
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
Updates native build configuration to improve compatibility with Haiku when building dotnet/runtime native components, primarily by feature-detecting pthread robust-mutex APIs and adjusting Haiku linker behavior in CMake.
Changes:
- Add CMake feature checks for
pthread_mutex_consistentandpthread_mutexattr_setrobust, and expose them viapal_config.h. - Conditionally compile robust-mutex initialization and recovery paths in
pal_crossprocessmutex.cbased on those feature macros. - Adjust Haiku CMake linker-group settings as a workaround for missing upstream CMake support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/native/libs/System.Native/pal_crossprocessmutex.c | Guard robust mutex attr usage and EOWNERDEAD recovery logic behind feature macros. |
| src/native/libs/configure.cmake | Add configure-time detection for robust-mutex related pthread APIs. |
| src/native/libs/Common/pal_config.h.in | Export new HAVE_PTHREAD_MUTEX_* feature macros to native builds. |
| eng/native/configurecompiler.cmake | Set Haiku linker-group rescan settings and adjust Haiku linker flags. |
| error = pthread_mutexattr_settype(&mutexAttributes, PTHREAD_MUTEX_RECURSIVE); | ||
| assert(error == 0); | ||
|
|
||
| #if HAVE_PTHREAD_MUTEXATTR_SETROBUST |
There was a problem hiding this comment.
@jkoritzinsky Is the cross-process mutex going to work without these APIs? Should Haiku use the fallback path instead?
There was a problem hiding this comment.
Haiku needs to use the fallback path. These APIs are required for reliable behavior (unless Haiku makes this behavior default, which I would not expect).
There was a problem hiding this comment.
-> This change should be reverted, and Haiku should be switched to build pal_crossprocessmutex_unsupported.c instead.
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
Part of #55803.