Skip to content

Commit

Permalink
native: Improve handling of "stat" variants
Browse files Browse the repository at this point in the history
Depending on the exact setup, Java on Linux may not have access to the
symbol named "stat", and instead uses an __xstat function instead.
The availability of these functions vary across target systems.

Currently, we build with certain Linux SDKs and assume that they will
just work fine one way or another (i.e., by either linking with glibc or
not, via the nodeps variant).

Apparently, this doesn't work with Loongnix 20.6, which uses an older
glibc than what we expected from other loongarch64 systems we tested.

This is a good opportunity to rework the "stat" symbol lookup and
properly check for the availability of __xstat/stat by delaring them as
weak symbols and taking it from there.

#161
  • Loading branch information
kohlschuetter committed Sep 11, 2024
1 parent 9b812d9 commit 4ebb6bb
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 20 deletions.
Loading

0 comments on commit 4ebb6bb

Please sign in to comment.