Skip to content

[OpenMP] Simplify GNU strerror_r check for Android #148990

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Jul 15, 2025

Android 6 is the baseline so simplify the Android check.

Android 6 is the baseline so simplify the Android check.
@brad0 brad0 requested a review from enh-google July 15, 2025 23:30
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label Jul 15, 2025
@@ -708,9 +708,7 @@ static char *sys_error(int err) {
int strerror_r( int, char *, size_t ); // XSI version
*/

#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || \
(defined(__BIONIC__) && defined(_GNU_SOURCE) && \
__ANDROID_API__ >= __ANDROID_API_M__)
Copy link
Contributor

Choose a reason for hiding this comment

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

openmp is distributed as part of the NDK, so i think it's too early to drop apis 21 and 22.

@pirama-arumuga-nainar though, because for all i know we already only build openmp at a higher api level, so it's already broken.

actually, i can just check myself...

~/Downloads/android-ndk-r28b$ ~/toybox/toybox readelf -aW ./toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/aarch64/libomp.so | grep NT_VERSION
  Android              0x00000084	NT_VERSION	API level 21, NDK r27-beta1 (11883388)
~/Downloads/android-ndk-r28b$ 

if you wanted to extern "C" strerror_r() yourself, the XSI one has always been available, so you could remove bionic from this gnu side altogether (at the cost of either a manual extern "C" or not building with _GNU_SOURCE). but it's probably easier to just wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

openmp is distributed as part of the NDK, so i think it's too early to drop apis 21 and 22.

@pirama-arumuga-nainar though, because for all i know we already only build openmp at a higher api level, so it's already broken.

Ok, I can leave it for now. No rush. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants