about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/abi-versions.awk8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/abi-versions.awk b/scripts/abi-versions.awk
index b8994c7e75..ab98d78e54 100644
--- a/scripts/abi-versions.awk
+++ b/scripts/abi-versions.awk
@@ -1,6 +1,9 @@
 # Script to generate <abi-versions.h> header file from Versions.all list.
 # See include/shlib-compat.h comments for explanation.
 
+# This script expects the following variables to be defined:
+# oldest_abi		the oldest ABI supported
+
 BEGIN {
   print "/* This file is automatically generated by abi-versions.awk.";
   print "   It defines symbols used by shlib-compat.h, which see.  */";
@@ -12,6 +15,7 @@ NF == 2 && $2 == "{" {
   gsub(/[^A-Za-z0-9_ 	]/, "_"); libid = $1;
   printf "\n/* start %s */\n", thislib;
   n = 0;
+  start = 0;
   next;
 }
 $1 == "}" {
@@ -36,6 +40,10 @@ $2 == "=" {
 
   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;
+  if ("GLIBC_" oldest_abi == vers)
+    start = 1;
+  if (start == 0 && oldest_abi != "default")
+    --n;
   next;
 }