diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-12-29 13:21:29 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-01-21 14:11:53 -0300 |
commit | 46c1c765d14c77c6c36df1b51dae6674a4eef06b (patch) | |
tree | 435a65a76f8d01fbf8a76da7f2fda54c2ce03731 /sysdeps | |
parent | 28f2ce27722d890a884cc7fa2f6d2bc0cb418f26 (diff) | |
download | glibc-46c1c765d14c77c6c36df1b51dae6674a4eef06b.zip glibc-46c1c765d14c77c6c36df1b51dae6674a4eef06b.tar.gz glibc-46c1c765d14c77c6c36df1b51dae6674a4eef06b.tar.bz2 |
Revert "linux: Move {f}xstat{at} to compat symbols" for static build
This reverts commit 20b39d59467b0c1d858e89ded8b0cebe55e22f60 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.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/fxstat.c | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/fxstat64.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/fxstatat.c | 3 | ||||
-rw-r--r-- | sysdeps/mach/hurd/fxstatat64.c | 3 | ||||
-rw-r--r-- | sysdeps/mach/hurd/lxstat.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/lxstat64.c | 3 | ||||
-rw-r--r-- | sysdeps/mach/hurd/xstat.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/xstat64.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fxstat.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fxstat64.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fxstatat.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/fxstatat64.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/lxstat.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/lxstat64.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/xstat.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/xstat64.c | 5 |
16 files changed, 26 insertions, 28 deletions
diff --git a/sysdeps/mach/hurd/fxstat.c b/sysdeps/mach/hurd/fxstat.c index 8568d0d..fff521f 100644 --- a/sysdeps/mach/hurd/fxstat.c +++ b/sysdeps/mach/hurd/fxstat.c @@ -21,7 +21,7 @@ #include <hurd.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 descriptor FD in BUF. */ int @@ -34,4 +34,4 @@ __fxstat (int vers, int fd, struct stat *buf) } weak_alias (__fxstat, _fxstat) -#endif +#endif /* LIB_COMPAT */ diff --git a/sysdeps/mach/hurd/fxstat64.c b/sysdeps/mach/hurd/fxstat64.c index cb5161f..c116655 100644 --- a/sysdeps/mach/hurd/fxstat64.c +++ b/sysdeps/mach/hurd/fxstat64.c @@ -21,7 +21,7 @@ #include <hurd.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) /* Get information about the file descriptor FD in BUF. */ int diff --git a/sysdeps/mach/hurd/fxstatat.c b/sysdeps/mach/hurd/fxstatat.c index 825e080..995b0ad 100644 --- a/sysdeps/mach/hurd/fxstatat.c +++ b/sysdeps/mach/hurd/fxstatat.c @@ -22,7 +22,7 @@ #include <hurd.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) int __fxstatat (int vers, int fd, const char *filename, struct stat *buf, int flag) @@ -32,5 +32,4 @@ __fxstatat (int vers, int fd, const char *filename, struct stat *buf, int flag) return __fstatat (fd, filename, buf, flag); } - #endif diff --git a/sysdeps/mach/hurd/fxstatat64.c b/sysdeps/mach/hurd/fxstatat64.c index c787f98..f24e272 100644 --- a/sysdeps/mach/hurd/fxstatat64.c +++ b/sysdeps/mach/hurd/fxstatat64.c @@ -23,7 +23,7 @@ #include <hurd.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) /* Get information about the file descriptor FD in BUF. */ int @@ -35,5 +35,4 @@ __fxstatat64 (int vers, int fd, const char *filename, struct stat64 *buf, return __fstatat64 (fd, filename, buf, flag); } - #endif diff --git a/sysdeps/mach/hurd/lxstat.c b/sysdeps/mach/hurd/lxstat.c index 440c0ef..b9ad6b4 100644 --- a/sysdeps/mach/hurd/lxstat.c +++ b/sysdeps/mach/hurd/lxstat.c @@ -21,7 +21,7 @@ #include <hurd.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) int __lxstat (int vers, const char *file, struct stat *buf) diff --git a/sysdeps/mach/hurd/lxstat64.c b/sysdeps/mach/hurd/lxstat64.c index 2ee81ec..2b8f2ab 100644 --- a/sysdeps/mach/hurd/lxstat64.c +++ b/sysdeps/mach/hurd/lxstat64.c @@ -22,7 +22,7 @@ #include <hurd.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) /* Get information about the file descriptor FD in BUF. */ int @@ -33,5 +33,4 @@ __lxstat64 (int vers, const char *file, struct stat64 *buf) return __lstat64 (file, buf); } - #endif diff --git a/sysdeps/mach/hurd/xstat.c b/sysdeps/mach/hurd/xstat.c index fe52d29..3c36f98 100644 --- a/sysdeps/mach/hurd/xstat.c +++ b/sysdeps/mach/hurd/xstat.c @@ -20,7 +20,7 @@ #include <hurd.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 file information about FILE in BUF. */ int diff --git a/sysdeps/mach/hurd/xstat64.c b/sysdeps/mach/hurd/xstat64.c index 7a68d6a..dd1c6c3 100644 --- a/sysdeps/mach/hurd/xstat64.c +++ b/sysdeps/mach/hurd/xstat64.c @@ -21,7 +21,7 @@ #include <hurd.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) /* Get information about the file descriptor FD in BUF. */ int diff --git a/sysdeps/unix/sysv/linux/fxstat.c b/sysdeps/unix/sysv/linux/fxstat.c index 216ec7d..f3917e3 100644 --- a/sysdeps/unix/sysv/linux/fxstat.c +++ b/sysdeps/unix/sysv/linux/fxstat.c @@ -26,7 +26,7 @@ # 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 FD in BUF. */ int @@ -61,6 +61,6 @@ __fxstat (int vers, int fd, struct stat *buf) } } -# endif /* SHLIB_COMPAT */ +# endif /* LIB_COMPAT */ #endif /* XSTAT_IS_XSTAT64 */ diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c index ede7ac0..be12798 100644 --- a/sysdeps/unix/sysv/linux/fxstat64.c +++ b/sysdeps/unix/sysv/linux/fxstat64.c @@ -26,7 +26,7 @@ #include <statx_cp.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 FD in BUF. */ @@ -78,4 +78,4 @@ strong_alias (___fxstat64, __fxstat64) strong_alias (___fxstat64, __fxstat) #endif -#endif /* SHLIB_COMPAT */ +#endif /* LIB_COMPAT */ diff --git a/sysdeps/unix/sysv/linux/fxstatat.c b/sysdeps/unix/sysv/linux/fxstatat.c index 7217bbd..853328d 100644 --- a/sysdeps/unix/sysv/linux/fxstatat.c +++ b/sysdeps/unix/sysv/linux/fxstatat.c @@ -26,7 +26,7 @@ # include <xstatover.h> # include <shlib-compat.h> -# if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) +# if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) /* Get information about the file FD in BUF. */ int @@ -50,6 +50,6 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag) #endif } -# endif /* SHLIB_COMPAT */ +# endif /* LIB_COMPAT */ #endif /* XSTAT_IS_XSTAT64 */ diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c index 71cc593..f442bff 100644 --- a/sysdeps/unix/sysv/linux/fxstatat64.c +++ b/sysdeps/unix/sysv/linux/fxstatat64.c @@ -26,7 +26,7 @@ #include <statx_cp.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) /* Get information about the file FD in BUF. */ @@ -69,4 +69,4 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag) strong_alias (__fxstatat64, __fxstatat) #endif -#endif /* SHLIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */ +#endif /* LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */ diff --git a/sysdeps/unix/sysv/linux/lxstat.c b/sysdeps/unix/sysv/linux/lxstat.c index e9833e7..7a644dc 100644 --- a/sysdeps/unix/sysv/linux/lxstat.c +++ b/sysdeps/unix/sysv/linux/lxstat.c @@ -26,7 +26,7 @@ # include <xstatconv.h> # include <xstatover.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 diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c index e2415f4..37c70ba 100644 --- a/sysdeps/unix/sysv/linux/lxstat64.c +++ b/sysdeps/unix/sysv/linux/lxstat64.c @@ -26,7 +26,7 @@ #include <statx_cp.h> #include <shlib-compat.h> -#if SHLIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) +#if LIB_COMPAT(libc, GLIBC_2_1, GLIBC_2_33) /* Get information about the file NAME in BUF. */ @@ -95,4 +95,4 @@ strong_alias (___lxstat64, __lxstat64); strong_alias (___lxstat64,__lxstat) #endif -#endif /* SHLIB_COMPAT */ +#endif /* LIB_COMPAT */ diff --git a/sysdeps/unix/sysv/linux/xstat.c b/sysdeps/unix/sysv/linux/xstat.c index 60d8323..4ee0835 100644 --- a/sysdeps/unix/sysv/linux/xstat.c +++ b/sysdeps/unix/sysv/linux/xstat.c @@ -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 */ diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c index b75a0fa..36947ed 100644 --- a/sysdeps/unix/sysv/linux/xstat64.c +++ b/sysdeps/unix/sysv/linux/xstat64.c @@ -26,7 +26,7 @@ #include <statx_cp.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. */ @@ -92,4 +92,5 @@ compat_symbol (libc, __old__xstat64, __xstat64, GLIBC_2_1); strong_alias (___xstat64, __xstat64) #endif -#endif /* SHLIB_COMPAT */ + +#endif /* LIB_COMPAT */ |