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 --disable-old-version.


We have --disable-versioning. This patch adds --disable-old-version. It
will not compile the older versions.

-- 
H.J. Lu (hjl@valinux.com)
---
2000-11-30  H.J. Lu  <hjl@gnu.org>

	* configure.in: Add --disable-old-version to substitute
	current-version-only and define CURRENT_VERSION_ONLY
	* configure: Rebuild.

	* config.make.in (current-version-only): New.

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

	* include/shlib-compat.h (SHLIB_COMPAT): Support
	CURRENT_VERSION_ONLY.

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/11/30 19:23:20
@@ -118,6 +118,17 @@ AC_ARG_ENABLE(versioning, dnl
 [  --disable-versioning    do not include versioning information in the
                           library objects [default=yes if supported]],
              enable_versioning=$enableval, enable_versioning=yes)
+AC_ARG_ENABLE(old-version, dnl
+[  --disable-old-version   do not include old versions of symbols in the
+                          library objects [default=yes if supported]],
+             enable_old_versio=$enableval, enable_old_version=yes)
+if test $enable_old_version = yes; then
+  current_version_only=no
+else
+  current_version_only=yes
+  AC_DEFINE(CURRENT_VERSION_ONLY)
+fi
+AC_SUBST(current_version_only)
 
 dnl Generic infrastructure for drop-in additions to libc.
 AC_ARG_ENABLE(add-ons, dnl
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 19:16:57
@@ -45,6 +45,7 @@ with-cvs = @with_cvs@
 old-glibc-headers = @old_glibc_headers@
 
 versioning = @VERSIONING@
+current-version-only = @current_version_only@
 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 19:35:25
@@ -56,6 +56,10 @@
 /* Define if versioning of the library is wanted.  */
 #undef	DO_VERSIONING
 
+/* Defined if we only want the current symbol version in the shared
+   library.  */
+#undef CURRENT_VERSION_ONLY
+
 /* Define if static NSS modules are wanted.  */
 #undef	DO_STATIC_NSS
 
Index: include/shlib-compat.h
===================================================================
RCS file: /work/cvs/gnu/glibc/include/shlib-compat.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 shlib-compat.h
--- include/shlib-compat.h	2000/05/21 21:11:02	1.1.1.1
+++ include/shlib-compat.h	2000/11/30 19:45:39
@@ -44,8 +44,9 @@
    in the GLIBC_2.0 version and obsoleted in the GLIBC_2.2 version.  */
 
 # define SHLIB_COMPAT(lib, introduced, obsoleted) \
-  (!(ABI_##lib##_##obsoleted - 0) \
-   || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0)))
+  (!(CURRENT_VERSION_ONLY - 0) \
+   && (!(ABI_##lib##_##obsoleted - 0) \
+       || ((ABI_##lib##_##introduced - 0) < (ABI_##lib##_##obsoleted - 0))))
 
 /* 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

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