mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
2000-03-22 Roland McGrath <roland@baalperazim.frob.com>
* include/shlib-compat.h (SHLIB_COMPAT): Take a third argument, indicating the first version set to obsolete the conditionalized code. * scripts/abi-versions.awk: For subsumed versions, make ABI_* defn's rhs be the ABI_* macro for the subsuming version. Assign increasing integer values to the ABI_* macros for supported versions.
This commit is contained in:
@@ -25,14 +25,22 @@
|
|||||||
# include <abi-versions.h> /* header generated by abi-versions.awk */
|
# include <abi-versions.h> /* header generated by abi-versions.awk */
|
||||||
|
|
||||||
/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
|
/* The file abi-versions.h (generated by scripts/abi-versions.awk) defines
|
||||||
symbols like `ABI_libm_GLIBC_2_0' to either 1 or 0 indicating whether or
|
symbols like `ABI_libm_GLIBC_2_0' for each version set in the source
|
||||||
not we want to build binary compatibility for e.g. the GLIBC_2.0 version
|
code for each library. For a version set that is subsumed by a later
|
||||||
set into the libm shared object. If this evaluates to zero, then there
|
version set, the definition gives the subsuming set, i.e. if GLIBC_2_0
|
||||||
is no need to compile in extra code to support this version set where it
|
is subsumed by GLIBC_2_1, then ABI_libm_GLIBC_2_0 == ABI_libm_GLIBC_2_1.
|
||||||
has been superseded by a newer version. The compatibility code should
|
Each version set that is to be distinctly defined in the output has an
|
||||||
be conditionalized with `#if SHLIB_COMPAT (libm, GLIBC_2_0)'. */
|
unique positive integer value, increasing with newer versions. Thus,
|
||||||
|
evaluating two ABI_* symbols reduces to integer values that differ only
|
||||||
|
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, version) ABI_##lib##_##version
|
# define SHLIB_COMPAT(lib, introduced, obsoleted) \
|
||||||
|
(ABI_##lib##_##introduced < ABI_##lib##_##obsoleted)
|
||||||
|
|
||||||
/* That header also defines symbols like `VERSION_libm_GLIBC_2_1' to
|
/* 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
|
the version set name to use for e.g. symbols first introduced into
|
||||||
@@ -51,7 +59,7 @@
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
/* Not compiling ELF shared libraries at all, so never any old versions. */
|
/* Not compiling ELF shared libraries at all, so never any old versions. */
|
||||||
# define SHLIB_COMPAT(lib, version) 0
|
# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
|
||||||
|
|
||||||
/* No versions to worry about, just make this the global definition. */
|
/* No versions to worry about, just make this the global definition. */
|
||||||
# define versioned_symbol(lib, local, symbol, version) \
|
# define versioned_symbol(lib, local, symbol, version) \
|
||||||
|
@@ -11,6 +11,7 @@ NF == 2 && $2 == "{" {
|
|||||||
thislib = $1;
|
thislib = $1;
|
||||||
gsub(/[^A-Za-z0-9_ ]/, "_"); libid = $1;
|
gsub(/[^A-Za-z0-9_ ]/, "_"); libid = $1;
|
||||||
printf "\n/* start %s */\n", thislib;
|
printf "\n/* start %s */\n", thislib;
|
||||||
|
n = 0;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$1 == "}" {
|
$1 == "}" {
|
||||||
@@ -19,18 +20,22 @@ $1 == "}" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$2 == "=" {
|
$2 == "=" {
|
||||||
new = $3;
|
old = $1; new = $3;
|
||||||
gsub(/[^A-Za-z0-9_ ]/, "_"); id = $1;
|
gsub(/[^A-Za-z0-9_ ]/, "_");
|
||||||
printf "#define ABI_%s_%s\t0\t/* earliest supported %s */\n", libid, id, new;
|
oldid = $1; newid = $3;
|
||||||
printf "#define VERSION_%s_%s\t%s\n", libid, id, new;
|
|
||||||
|
printf "#define ABI_%s_%s\tABI_%s_%s\n", libid, oldid, libid, newid;
|
||||||
|
printf "#define VERSION_%s_%s\t%s\n", libid, oldid, new;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
vers = $1;
|
vers = $1;
|
||||||
gsub(/[^A-Za-z0-9_ ]/, "_"); id = $1;
|
gsub(/[^A-Za-z0-9_ ]/, "_");
|
||||||
printf "#define ABI_%s_%s\t1\t/* support %s */\n", libid, id, vers;
|
versid = $1;
|
||||||
printf "#define VERSION_%s_%s\t%s\n", libid, id, vers;
|
|
||||||
|
printf "#define ABI_%s_%s\t%d\t/* support %s */\n", libid, versid, ++n, vers;
|
||||||
|
printf "#define VERSION_%s_%s\t%s\n", libid, versid, vers;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user