This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] Remove obsolete SHLIB_COMPAT conditionalization in Versions files
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Cc: Thomas Schwinge <tschwinge at gnu dot org>
- Date: Sat, 22 Feb 2014 01:24:13 -0800 (PST)
- Subject: [COMMITTED PATCH] Remove obsolete SHLIB_COMPAT conditionalization in Versions files
- Authentication-results: sourceware.org; auth=none
I haven't tested this at all, but it only immediately affects the Hurd
configuration and I'm pretty sure I know what I'm doing. But, you know.
As their old comments predicted, these sections could have been removed any
time after the switch to the libc.so.0.3 SONAME, but we never got around to
it. I'm doing it now to eliminate the only extant dependencies in Versions
files on abi-versions.h (via shlib-compat.h). The way to remove the
otherwise redundant and error-prone human-maintained Versions.def file is
to synthesize it from the Versions files, so using abi-versions.h in those
files will become a circular dependency.
So, as of now and henceforth, I hereby decree that Versions files may not
use shlib-compat.h and %if SHLIB_COMPAT as once was accepted practice. Let
it be known. To the extent that it is known anywhere by anyone what the
"rules" for writing Versions files are exactly.
Thanks,
Roland
2014-02-22 Roland McGrath <roland@hack.frob.com>
* Makerules ($(common-objpfx)Versions.v.i): No longer depend
on $(common-objpfx)abi-versions.h; using <shlib-compat.h> inside
Versions files is now verboten.
* hurd/Versions (libc: GLIBC_2.0):
Remove various [SHLIB_COMPAT (libc, GLIBC_2_0, ...)] sections.
(libc: HURD_CTHREADS_0.3): Remove conditionalization, was under
[!SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)].
* mach/Versions: Likewise.
--- a/Makerules
+++ b/Makerules
@@ -311,7 +311,6 @@ $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
# See %.v/%.v.i implicit rules in Makeconfig.
$(common-objpfx)Versions.v.i: $(wildcard $(subdirs:%=$(..)%/Versions)) \
$(wildcard $(sysdirs:%=%/Versions)) \
- $(common-objpfx)abi-versions.h \
$(sysd-versions-force)
$(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
$(common-objpfx)Versions.v \
--- a/hurd/Versions
+++ b/hurd/Versions
@@ -1,32 +1,5 @@
-%define SHARED
-%include <shlib-compat.h>
-
libc {
GLIBC_2.0 {
-%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
- # These few symbols are here only for binary compatibility
- # with the pre-versioning libc.so.0.2 ABI. Their replacements
- # are in the GLIBC_2.1 version set. When the soname changes,
- # these can be removed.
- __getuids;
- __hurd_file_name_lookup;
- _hurd_proc_init; _hurd_umask;
-%endif
-
- # These go into a different version set if GLIBC_2.0 compatibility
- # is not required. See below.
-%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
- # variables used for detecting cthreads
- _cthread_exit_routine; _cthread_init_routine;
-
- # cthreads functions with stubs in libc
- cthread_keycreate; cthread_getspecific; cthread_setspecific;
- __libc_getspecific;
-
- # weak refs to libthreads functions that libc calls iff libthreads in use
- cthread_fork; cthread_detach;
-%endif
-
# necessary for the Hurd brk implementation
_end;
@@ -157,7 +130,6 @@ libc {
__errno_location;
}
-%if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
HURD_CTHREADS_0.3 {
# weak refs to libthreads functions that libc calls iff libthreads in use
cthread_fork; cthread_detach;
@@ -169,5 +141,4 @@ libc {
cthread_keycreate; cthread_getspecific; cthread_setspecific;
__libc_getspecific;
}
-%endif
}
--- a/mach/Versions
+++ b/mach/Versions
@@ -1,27 +1,11 @@
-%define SHARED
-%include <shlib-compat.h>
-
libc {
GLIBC_2.0 {
-%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
- # This symbol is here only for binary compatibility with the
- # pre-versioning libc.so.0.2 ABI. When the soname changes,
- # it can be removed.
- __vm_allocate;
-%endif
-
# variables used in Mach-specific macros
__mach_task_self_;
__vm_page_size;
# functions used in inline functions and macros
__mach_port_deallocate; __mach_thread_self;
-%if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
- __mutex_init; __mutex_lock; __mutex_lock_solid; __mutex_trylock;
- __mutex_unlock; __mutex_unlock_solid;
- __spin_lock; __spin_lock_init; __spin_lock_solid; __spin_try_lock;
- __spin_unlock;
-%endif
# functions used by RPC stubs
__mach_msg; __mach_msg_overwrite;
@@ -71,12 +55,10 @@ libc {
mig_strncpy;
}
-%if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
HURD_CTHREADS_0.3 {
__mutex_init; __mutex_lock; __mutex_lock_solid; __mutex_trylock;
__mutex_unlock; __mutex_unlock_solid;
__spin_lock; __spin_lock_init; __spin_lock_solid; __spin_try_lock;
__spin_unlock;
}
-%endif
}