fakeroot icon indicating copy to clipboard operation
fakeroot copied to clipboard

Support LoongArch (lp64d ABI) architecture

Open asheplyakov opened this issue 1 year ago • 1 comments

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)).

asheplyakov avatar Mar 15 '23 20:03 asheplyakov