mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-26 00:57:39 +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:
@@ -21,8 +21,6 @@
|
||||
|
||||
# include <abi-versions.h>
|
||||
|
||||
#ifdef SHARED
|
||||
|
||||
/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
|
||||
symbols like `ABI_libm_GLIBC_2_0' for each version set in the source
|
||||
code for each library. For a version set that is subsumed by a later
|
||||
@@ -34,17 +32,24 @@
|
||||
when the two version sets named are in fact two different ABIs we are
|
||||
supporting. If these do not differ, then there is no need to compile in
|
||||
extra code to support this version set where it has been superseded by a
|
||||
newer version. The compatibility code should be conditionalized with
|
||||
e.g. `#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced
|
||||
in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version. */
|
||||
|
||||
# define SHLIB_COMPAT(lib, introduced, obsoleted) \
|
||||
_SHLIB_COMPAT (lib, introduced, obsoleted)
|
||||
# define _SHLIB_COMPAT(lib, introduced, obsoleted) \
|
||||
newer version. */
|
||||
#define LIB_COMPAT(lib, introduced, obsoleted) \
|
||||
_LIB_COMPAT (lib, introduced, obsoleted)
|
||||
#define _LIB_COMPAT(lib, introduced, obsoleted) \
|
||||
(IS_IN (lib) \
|
||||
&& (!(ABI_##lib##_##obsoleted - 0) \
|
||||
|| ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))))
|
||||
|
||||
#ifdef SHARED
|
||||
|
||||
/* Similar to LIB_COMPAT, but evaluate to 0 for static build. The
|
||||
compatibility code should be conditionalized with e.g.
|
||||
`#if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_2)' for code introduced
|
||||
in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version. */
|
||||
|
||||
# define SHLIB_COMPAT(lib, introduced, obsoleted) \
|
||||
_LIB_COMPAT (lib, introduced, obsoleted)
|
||||
|
||||
/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
|
||||
the version set name to use for e.g. symbols first introduced into
|
||||
libm in the GLIBC_2.1 version. Definitions of symbols with explicit
|
||||
|
||||
Reference in New Issue
Block a user