This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

A patch to add --with-oldest-abi=ABI. [Re: A patch to add --disable-old-version.]


On Thu, Nov 30, 2000 at 01:29:22PM -0800, H . J . Lu wrote:
> We have --disable-versioning. This patch adds --disable-old-version. It
> will not compile the older versions.
> 

Based on Roland suggestion, I withdraw the --disable-old-version patch.
Here is the patch to add --with-oldest-abi=ABI.


H.J.
---
2000-11-30  H.J. Lu  <hjl@gnu.org>

	* scripts/abi-versions.awk (oldest_abi): New variable.
	Handle the oldest ABI supported.

	* Makerules ($(common-objpfx)abi-versions.h): Set oldest_abi
	for scripts/abi-versions.awk.

	* configure.in: Add --with-oldest-abi=ABI.
	* configure: Rebuild.

	* config.make.in (oldest-abi): New.

	* config.h.in (GLIBC_OLDEST_ABI): New.

	* csu/version.c (banner): Support GLIBC_OLDEST_ABI.

Index: scripts/abi-versions.awk
===================================================================
RCS file: /work/cvs/gnu/glibc/scripts/abi-versions.awk,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 abi-versions.awk
--- scripts/abi-versions.awk	2000/05/21 21:11:25	1.1.1.1
+++ scripts/abi-versions.awk	2000/12/01 00:43:14
@@ -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;
 }
 
Index: Makerules
===================================================================
RCS file: /work/cvs/gnu/glibc/Makerules,v
retrieving revision 1.1.1.7
diff -u -p -r1.1.1.7 Makerules
--- Makerules	2000/07/29 16:19:49	1.1.1.7
+++ Makerules	2000/12/01 00:35:49
@@ -135,7 +135,7 @@ ifndef avoid-generated
 before-compile := $(common-objpfx)abi-versions.h $(before-compile)
 $(common-objpfx)abi-versions.h: $(..)scripts/abi-versions.awk \
 				$(common-objpfx)Versions.all
-	LC_ALL=C $(AWK) -f $^ > $@T
+	LC_ALL=C $(AWK) -v oldest_abi=$(oldest-abi) -f $^ > $@T
 	mv -f $@T $@
 endif # avoid-generated
 endif # $(versioning) = yes
Index: configure.in
===================================================================
RCS file: /work/cvs/gnu/glibc/configure.in,v
retrieving revision 1.1.1.17
diff -u -p -r1.1.1.17 configure.in
--- configure.in	2000/11/21 02:14:47	1.1.1.17
+++ configure.in	2000/12/01 00:04:11
@@ -80,6 +80,17 @@ AC_ARG_WITH(headers, dnl
                           [default=compiler default]],
 	    sysheaders=$withval, sysheaders='')
 
+AC_ARG_WITH(oldest-abi, dnl
+[  --with-oldest-abi=ABI   the oldest ABI supported [e.g. 2.2]
+                          [default=glibc default]],
+	    oldest_abi=$withval, oldest_abi='')
+if test ! -z "$oldest_abi"; then
+  AC_DEFINE_UNQUOTED(GLIBC_OLDEST_ABI, "$oldest_abi")
+else
+  oldest_abi=default
+fi
+AC_SUBST(oldest_abi)
+
 AC_ARG_ENABLE(libio, dnl
 [  --enable-libio          build in GNU libio instead of GNU stdio],
  	      [if test $enableval = yes; then
Index: config.make.in
===================================================================
RCS file: /work/cvs/gnu/glibc/config.make.in,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 config.make.in
--- config.make.in	2000/11/21 02:14:47	1.1.1.6
+++ config.make.in	2000/11/30 23:56:00
@@ -45,6 +45,7 @@ with-cvs = @with_cvs@
 old-glibc-headers = @old_glibc_headers@
 
 versioning = @VERSIONING@
+oldest-abi = @oldest_abi@
 no-whole-archive = @no_whole_archive@
 exceptions = @exceptions@
 have_doors = @linux_doors@
Index: config.h.in
===================================================================
RCS file: /work/cvs/gnu/glibc/config.h.in,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 config.h.in
--- config.h.in	2000/10/19 02:39:00	1.1.1.4
+++ config.h.in	2000/11/30 23:41:50
@@ -56,6 +56,9 @@
 /* Define if versioning of the library is wanted.  */
 #undef	DO_VERSIONING
 
+/* Defined to the oldest ABI we support, like 2.1.  */
+#undef GLIBC_OLDEST_ABI
+
 /* Define if static NSS modules are wanted.  */
 #undef	DO_STATIC_NSS
 
Index: csu/version.c
===================================================================
RCS file: /work/cvs/gnu/glibc/csu/version.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 version.c
--- csu/version.c	2000/11/21 02:14:48	1.1.1.2
+++ csu/version.c	2000/12/01 00:47:31
@@ -30,6 +30,9 @@ There is NO warranty; not even for MERCH
 PARTICULAR PURPOSE.\n\
 Compiled by GNU CC version "__VERSION__".\n"
 #include "version-info.h"
+#ifdef GLIBC_OLDEST_ABI
+"The oldest ABI supported: " GLIBC_OLDEST_ABI ".\n"
+#endif
 "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n";
 
 #include <unistd.h>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]