summary refs log tree commit diff
path: root/scripts/firstversions.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-19 20:36:44 +0000
committerRoland McGrath <roland@gnu.org>2000-03-19 20:36:44 +0000
commit361742eda986901daf75169faaf648d4d132ccfb (patch)
treea5d99df3b839ac0fd99cf17886ea35b900d16039 /scripts/firstversions.awk
parent882688521994c2329242212a61dd2a7c44eadbc6 (diff)
downloadglibc-361742eda986901daf75169faaf648d4d132ccfb.tar.gz
glibc-361742eda986901daf75169faaf648d4d132ccfb.tar.xz
glibc-361742eda986901daf75169faaf648d4d132ccfb.zip
* shlib-versions [USE_IN_LIBIO] (.*-.*-gnu-gnu*): Set earliest
	supported version for libc 0.2.90.libio to GLIBC_2.2.

	* Makeconfig (soversions.mk): Grok new third column in shlib-versions,
	and use it to emit new variable `map-firstversions'.
	* scripts/firstversions.awk: New file.
	* Makerules (Versions.all): Use scripts/firstversions.awk and
	the $(map-firstversions) value to generate a modified versions list
	that includes renames in "A = B" syntax for each version set earlier
	than the "earliest symbol version" named in shlib-versions.
	* scripts/versions.awk: Recognize "A = B" lines in the input to mean
	rename version set A to B in the output to the intermediate file.
	* scripts/abi-versions.awk: New file.
	* Makerules (abi-versions.h): New target, generated by that script.
	[$(versioning) = yes] (before-compile): Prepend abi-versions.h.
	* include/shlib-compat.h: New file, uses that generated header.
Diffstat (limited to 'scripts/firstversions.awk')
-rw-r--r--scripts/firstversions.awk27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk
new file mode 100644
index 0000000000..236d90ec97
--- /dev/null
+++ b/scripts/firstversions.awk
@@ -0,0 +1,27 @@
+# Script to preprocess Versions.all lists based on "earliest version"
+# specifications in the shlib-versions file.
+
+NF == 3 && $2 == ":" { firstversion[$1] = $3; next }
+
+NF == 2 && $2 == "{" { thislib = $1; print; next }
+
+$1 == "}" {
+  if (firstversion[thislib]) {
+    # We haven't seen the stated version, but have produced
+    # others pointing to it, so we synthesize it now.
+    printf "  %s\n", firstversion[thislib];
+  }
+  print;
+  next;
+}
+
+{
+  if (! firstversion[thislib])
+    print;
+  else if ($1 == firstversion[thislib]) {
+    print;
+    firstversion[thislib] = 0;
+  }
+  else
+    print $1, "=", firstversion[thislib];
+}