summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac66
-rw-r--r--lib/libcrypt.map.in2
-rw-r--r--lib/libcrypt.minver.hurd31
-rw-r--r--lib/libcrypt.minver.kfreebsd32
-rw-r--r--lib/libcrypt.minver.linux (renamed from lib/libcrypt.minver)0
-rw-r--r--lib/libcrypt.minver.no0
7 files changed, 109 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am
index c0d3143..3502a5c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -33,7 +33,10 @@ EXTRA_DIST = \
lib/gen-vers.awk \
lib/hashes.lst \
lib/libcrypt.map.in \
- lib/libcrypt.minver \
+ lib/libcrypt.minver.linux \
+ lib/libcrypt.minver.kfreebsd \
+ lib/libcrypt.minver.hurd \
+ lib/libcrypt.minver.no \
lib/sel-hashes.awk \
lib/xcrypt.h.in \
m4/skip-if-exec-format-error \
@@ -155,7 +158,7 @@ libcrypt_la_LDFLAGS += $(UNDEF_FLAG) $(TEXT_RELOC_FLAG) $(AM_LDFLAGS)
libcrypt_la_CPPFLAGS = $(AM_CPPFLAGS) -DIN_LIBCRYPT
-CONFIG_STATUS_DEPENDENCIES = lib/libcrypt.minver
+CONFIG_STATUS_DEPENDENCIES = lib/libcrypt.minver.$(MINVER_OS)
EXTRA_libcrypt_la_DEPENDENCIES = libcrypt.map
CLEANFILES = \
Makefile.deps Makefile.deps.T \
diff --git a/configure.ac b/configure.ac
index 9fc01ac..18ad5b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -431,38 +431,51 @@ if test x$enable_shared != xyes; then enable_obsolete_api=0; fi
# Determine whether there's even a GNU libc on this system that we
# need to be binary backward compatible with.
+MINVER_OS=no
SYMVER_FLOOR=none
if test $enable_obsolete_api = 1; then
AC_MSG_CHECKING([minimum symbol version to use for compatibility symbols])
case $host_os in
- *linux*)
- while read pattern version cond; do
- if test -z "$pattern" || test "x$pattern" = 'x#'; then
- continue
- fi
- if expr "$host_cpu" : "$pattern" > /dev/null; then
- if test -z "$cond"; then
- cond_matched=yes
- else
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
-#include <limits.h>
-#if $cond
-#error yes
-#endif
- ]])],
- [cond_matched=no], [cond_matched=yes])
+ *gnu*)
+ # GNU Systems use glibc
+ case $host_os in
+ *linux*)
+ MINVER_OS=linux
+ ;;
+ kfreebsd-gnu*)
+ MINVER_OS=kfreebsd
+ ;;
+ gnu*)
+ MINVER_OS=hurd
+ ;;
+ *)
+ ;;
+ esac
+
+ if test $MINVER_OS != no ; then
+ while read pattern version cond; do
+ if test -z "$pattern" || test "x$pattern" = 'x#'; then
+ continue
fi
- if test $cond_matched = yes; then
- SYMVER_FLOOR="$version"
- break
+ if expr "$host_cpu" : "$pattern" > /dev/null; then
+ if test -z "$cond"; then
+ cond_matched=yes
+ else
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
+ #include <limits.h>
+ #if $cond
+ #error yes
+ #endif
+ ]])],
+ [cond_matched=no], [cond_matched=yes])
+ fi
+ if test $cond_matched = yes; then
+ SYMVER_FLOOR="$version"
+ break
+ fi
fi
- fi
- done < ${srcdir}/lib/libcrypt.minver
- ;;
-
- *gnu*)
- # glibc exists for GNU Hurd, but it is unclear to me whether
- # it has a stable ABI yet. For now, we are assuming not.
+ done < ${srcdir}/lib/libcrypt.minver.$MINVER_OS
+ fi
;;
*)
@@ -479,6 +492,7 @@ if test x"$SYMVER_FLOOR" = xnone; then
else
SYMVER_MIN=GLIBC_2.0
fi
+AC_SUBST([MINVER_OS])
AC_SUBST([SYMVER_FLOOR])
AC_SUBST([SYMVER_MIN])
diff --git a/lib/libcrypt.map.in b/lib/libcrypt.map.in
index 89fa2a5..59b4b6d 100644
--- a/lib/libcrypt.map.in
+++ b/lib/libcrypt.map.in
@@ -42,7 +42,7 @@ fcrypt - GLIBC_2.0
# version that appears above must also appear in this list, and to
# simplify gen-map.awk, so must all of the versions listed in
# libcrypt.minver. The ordering is left to right, top to bottom.
-%chain GLIBC_2.0 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.5 GLIBC_2.3
+%chain GLIBC_2.0 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3
%chain GLIBC_2.4 GLIBC_2.12 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18 GLIBC_2.21
%chain GLIBC_2.27
%chain OW_CRYPT_1.0 XCRYPT_2.0 XCRYPT_4.3 XCRYPT_4.4
diff --git a/lib/libcrypt.minver.hurd b/lib/libcrypt.minver.hurd
new file mode 100644
index 0000000..846dc7d
--- /dev/null
+++ b/lib/libcrypt.minver.hurd
@@ -0,0 +1,31 @@
+# This file records the minimum symbol version number used by GNU libc
+# for each Hurd port that it supports. This is used to override the
+# compatibility symbol versions in libcrypt.map.in, to ensure actual
+# binary compatibility with the libcrypt formerly shipped by GNU libc
+# on each architecture.
+#
+# If your architecture does not match any of the patterns in the list,
+# or if your operating system is not Linux, it is assumed that you do
+# not have a GNU libc that shipped libcrypt to be backward compatible
+# with, and configure will automatically set --disable-obsolete-api.
+# (This does include the Hurd, even though that's used glibc for a
+# long time too -- we are currently assuming that binary backward
+# compatibility is not a priority for the Hurd community so far.)
+#
+# The patterns in the first column are regular expressions (as
+# understood by 'expr') to be matched against the configure-time
+# $host_cpu variable. They are processed from top to bottom; since
+# older architectures' regexps may match newer subarchitectures'
+# patterns, that means the list is in *reverse* chronological order
+# and new entries should be added at the *top*.
+#
+# The second column gives the minimum symbol version number.
+#
+# If there is anything more on the line after the second column, all of it
+# is taken as a preprocessor #if expression which must be true for
+# this line's version number to be used. The macros defined in
+# <limits.h> are available to this expression. This mechanism is for
+# subarchitectures that do not change $host_cpu (I wish they wouldn't
+# do that...)
+
+i[3-9]86.* GLIBC_2.2.6
diff --git a/lib/libcrypt.minver.kfreebsd b/lib/libcrypt.minver.kfreebsd
new file mode 100644
index 0000000..947a115
--- /dev/null
+++ b/lib/libcrypt.minver.kfreebsd
@@ -0,0 +1,32 @@
+# This file records the minimum symbol version number used by GNU libc
+# for each kFreeBSD port that it supports. This is used to override the
+# compatibility symbol versions in libcrypt.map.in, to ensure actual
+# binary compatibility with the libcrypt formerly shipped by GNU libc
+# on each architecture.
+#
+# If your architecture does not match any of the patterns in the list,
+# or if your operating system is not Linux, it is assumed that you do
+# not have a GNU libc that shipped libcrypt to be backward compatible
+# with, and configure will automatically set --disable-obsolete-api.
+# (This does include the Hurd, even though that's used glibc for a
+# long time too -- we are currently assuming that binary backward
+# compatibility is not a priority for the Hurd community so far.)
+#
+# The patterns in the first column are regular expressions (as
+# understood by 'expr') to be matched against the configure-time
+# $host_cpu variable. They are processed from top to bottom; since
+# older architectures' regexps may match newer subarchitectures'
+# patterns, that means the list is in *reverse* chronological order
+# and new entries should be added at the *top*.
+#
+# The second column gives the minimum symbol version number.
+#
+# If there is anything more on the line after the second column, all of it
+# is taken as a preprocessor #if expression which must be true for
+# this line's version number to be used. The macros defined in
+# <limits.h> are available to this expression. This mechanism is for
+# subarchitectures that do not change $host_cpu (I wish they wouldn't
+# do that...)
+
+x86_64.* GLIBC_2.3 /* 64 */ defined __x86_64__
+i[3-9]86.* GLIBC_2.3
diff --git a/lib/libcrypt.minver b/lib/libcrypt.minver.linux
index e1896bb..e1896bb 100644
--- a/lib/libcrypt.minver
+++ b/lib/libcrypt.minver.linux
diff --git a/lib/libcrypt.minver.no b/lib/libcrypt.minver.no
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/libcrypt.minver.no