Support LoongArch (lp64d ABI) architecture #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before glibc 2.33 the stat family of functions (and mknod) used to be inline wrappers around calls to xstat, fxstat, lxstat, xmknod, which all take a leading version number argument designating the data structure and bits used. Thus with glibc < 2.33 libfakeroot needs to wrap only xstat, fxstat, xmknod only.
In glibc 2.33 inline wrapper functions have been removed. Instead libc.so.6 exports stat, stat64, etc symbols. xstat, fxstat, xmknod still exist (for compatibility reasons). Thus with glibc 2.33 and newer libfakeroot must wrap both stat (fstat, statat, fstatat, etc) and internal xstat (fxstat, etc) functions.
However some new architectures (such as LoongArch lp64d ABI) decided to be 64-bit only since the day 0 and don't use any wrappers. In this case libfakeroot should wrap only stat (statat, fstat, fstatat). A special care should be taken to avoid the double definition (via WRAP_STAT and anotherone under #if __GLIBC_PREREQ(2,33)).