1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Improve consistency of --enable-kernel and default builds.

This commit is contained in:
Joseph Myers
2012-05-14 22:22:52 +00:00
parent 11de3a3371
commit 37f1abd46c
3 changed files with 28 additions and 30 deletions

View File

@ -1,3 +1,9 @@
2012-05-14 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/configure.in (minimum_kernel): Always
set if not set by the user. Do not allow for being unset.
* sysdeps/unix/sysv/linux/configure: Regenerated.
2012-05-14 H.J. Lu <hongjiu.lu@intel.com> 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Remove * sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Remove

View File

@ -331,17 +331,14 @@ $as_echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel"
minimum_kernel=$arch_minimum_kernel minimum_kernel=$arch_minimum_kernel
fi fi
else else
if test $arch_minimum_kernel != '2.2.0'; then minimum_kernel=$arch_minimum_kernel
minimum_kernel=$arch_minimum_kernel
fi
fi fi
if test -n "$minimum_kernel"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel header at least $minimum_kernel" >&5
$as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; } $as_echo_n "checking for kernel header at least $minimum_kernel... " >&6; }
decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <linux/version.h> #include <linux/version.h>
#if LINUX_VERSION_CODE < $decnum #if LINUX_VERSION_CODE < $decnum
@ -356,21 +353,20 @@ else
fi fi
rm -f conftest* rm -f conftest*
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_minimum_kernel" >&5
$as_echo "$libc_minimum_kernel" >&6; } $as_echo "$libc_minimum_kernel" >&6; }
if test "$libc_minimum_kernel" = ok; then if test "$libc_minimum_kernel" = ok; then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define __LINUX_KERNEL_VERSION $decnum #define __LINUX_KERNEL_VERSION $decnum
_ACEOF _ACEOF
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define __ABI_TAG_VERSION $abinum #define __ABI_TAG_VERSION $abinum
_ACEOF _ACEOF
else else
as_fn_error $? "*** The available kernel headers are older than the requested as_fn_error $? "*** The available kernel headers are older than the requested
*** compatible kernel version" "$LINENO" 5 *** compatible kernel version" "$LINENO" 5
fi
fi fi
# The result of the above test for the use of the FDE code is invalid if # The result of the above test for the use of the FDE code is invalid if

View File

@ -87,29 +87,25 @@ if test -n "$minimum_kernel"; then
minimum_kernel=$arch_minimum_kernel minimum_kernel=$arch_minimum_kernel
fi fi
else else
if test $arch_minimum_kernel != '2.2.0'; then minimum_kernel=$arch_minimum_kernel
minimum_kernel=$arch_minimum_kernel
fi
fi fi
if test -n "$minimum_kernel"; then AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
changequote(,)dnl changequote(,)dnl
decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`; decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`; abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
changequote([,])dnl changequote([,])dnl
AC_EGREP_CPP([eat flaming death], [#include <linux/version.h> AC_EGREP_CPP([eat flaming death], [#include <linux/version.h>
#if LINUX_VERSION_CODE < $decnum #if LINUX_VERSION_CODE < $decnum
eat flaming death eat flaming death
#endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok) #endif], libc_minimum_kernel='too old!', libc_minimum_kernel=ok)
AC_MSG_RESULT($libc_minimum_kernel) AC_MSG_RESULT($libc_minimum_kernel)
if test "$libc_minimum_kernel" = ok; then if test "$libc_minimum_kernel" = ok; then
AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum) AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum)
AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum) AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum)
else else
AC_MSG_ERROR([*** The available kernel headers are older than the requested AC_MSG_ERROR([*** The available kernel headers are older than the requested
*** compatible kernel version]) *** compatible kernel version])
fi
fi fi
# The result of the above test for the use of the FDE code is invalid if # The result of the above test for the use of the FDE code is invalid if