1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Revert "linux: Move {f}xstat{at} to compat symbols" for static build

This reverts commit 20b39d5946 for static
library.  This avoids the need to rebuild the world for the case where
libstdc++ (and potentially other libraries) are linked to a old glibc.

To avoid requering to provide xstat symbols for newer ABIs (such as
riscv32) a new LIB_COMPAT macro is added.  It is similar to SHLIB_COMPAT
but also works for static case (thus evaluating similar to SHLIB_COMPAT
for both shared and static case).

Checked with a check-abi on all affected ABIs. I also check if the
static library does contains the xstat symbols.
This commit is contained in:
Adhemerval Zanella
2020-12-29 13:21:29 +00:00
parent 28f2ce2772
commit 46c1c765d1
17 changed files with 40 additions and 37 deletions

View File

@ -20,13 +20,13 @@
#include <fcntl.h>
#include <kernel_stat.h>
#include <sysdep.h>
#include <shlib-compat.h>
#if !XSTAT_IS_XSTAT64
# include <xstatconv.h>
# include <xstatover.h>
# include <shlib-compat.h>
# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
# if LIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* Get information about the file NAME in BUF. */
int
@ -61,6 +61,6 @@ __xstat (int vers, const char *name, struct stat *buf)
}
}
# endif /* SHLIB_COMPAT */
# endif /* LIB_COMPAT */
#endif /* XSTAT_IS_XSTAT64 */