1996-06-10 09:41:16 +00:00
|
|
|
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|
|
|
# Local configure fragment for sysdeps/unix/sysv/linux.
|
|
|
|
|
Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.
In <https://sourceware.org/ml/libc-alpha/2016-01/msg00885.html> I
proposed a minimum Linux kernel version of 3.2 for glibc 2.24, since
Linux 2.6.32 has reached EOL.
In the discussion in February, some concerns were expressed about
compatibility with OpenVZ containers. It's not clear that these are
real issues, given OpenVZ backporting kernel features and faking the
kernel version for guest software, as discussed in
<https://sourceware.org/ml/libc-alpha/2016-02/msg00278.html>. It's
also not clear that supporting running GNU/Linux distributions from
late 2016 (at the earliest) on a kernel series from 2009 is a sensible
expectation. However, as an interim step, this patch increases the
requirement everywhere except x86 / x86_64 (since the controversy was
only about those architectures); the special caveats and settings can
easily be removed later when we're ready to increase the requirements
on x86 / x86_64 (and if someone would like to raise the issue on LWN
as suggested in the previous discussion, that would be welcome). 3.2
kernel headers are required everywhere by this patch.
(x32 already requires 3.4 or later, so is unaffected by this patch.)
As usual for such a change, this patch only changes the configure
scripts and associated documentation. The intent is to follow up with
removal of dead __LINUX_KERNEL_VERSION conditionals. Each __ASSUME_*
or other macro that becomes dead can then be removed independently.
Tested for x86_64 and x86.
* sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION):
Define to 3.2.0.
(arch_minimum_kernel): Likewise.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/i386/configure.ac (arch_minimum_kernel):
Define to 2.6.32.
* sysdeps/unix/sysv/linux/i386/configure: Regenerated.
* sysdeps/unix/sysv/linux/x86_64/64/configure.ac
(arch_minimum_kernel): Define to 2.6.32.
* sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerated.
* README: Document Linux 3.2 requirement.
* manual/install.texi (Linux): Document Linux 3.2 headers
requirement.
* INSTALL: Regenerated.
2016-02-24 17:15:12 +00:00
|
|
|
define([LIBC_LINUX_VERSION],[3.2.0])dnl
|
1998-08-21 22:29:58 +00:00
|
|
|
if test -n "$sysheaders"; then
|
2000-01-27 01:31:24 +00:00
|
|
|
OLD_CPPFLAGS=$CPPFLAGS
|
|
|
|
CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
|
1998-08-21 22:29:58 +00:00
|
|
|
fi
|
1996-07-25 22:41:27 +00:00
|
|
|
define([libc_cv_linuxVER], [libc_cv_linux]patsubst(LIBC_LINUX_VERSION,[\.]))dnl
|
|
|
|
AC_CACHE_CHECK(installed Linux kernel header files, libc_cv_linuxVER, [dnl
|
2021-05-22 02:42:48 +00:00
|
|
|
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <linux/version.h>
|
1999-05-29 22:56:42 +00:00
|
|
|
#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < ]dnl
|
1996-07-25 22:41:27 +00:00
|
|
|
patsubst(LIBC_LINUX_VERSION,[^\([^.]*\)\.\([^.]*\)\.\([^.]*\)$],dnl
|
|
|
|
[ (\1 *65536+ \2 *256+ \3) /* \1.\2.\3 */])[
|
2014-07-04 03:35:42 +00:00
|
|
|
# error kernel headers missing or too old
|
2021-05-22 02:42:48 +00:00
|
|
|
#endif]], [[]])],
|
2014-07-04 03:35:42 +00:00
|
|
|
[libc_cv_linuxVER='LIBC_LINUX_VERSION or later'],
|
|
|
|
[libc_cv_linuxVER='missing or too old!'])])
|
1996-07-25 22:41:27 +00:00
|
|
|
if test "$libc_cv_linuxVER" != 'LIBC_LINUX_VERSION or later'; then
|
|
|
|
AC_MSG_ERROR([GNU libc requires kernel header files from
|
|
|
|
Linux LIBC_LINUX_VERSION or later to be installed before configuring.
|
|
|
|
The kernel header files are found usually in /usr/include/asm and
|
|
|
|
/usr/include/linux; make sure these directories use files from
|
|
|
|
Linux LIBC_LINUX_VERSION or later. This check uses <linux/version.h>, so
|
|
|
|
make sure that file was built correctly when installing the kernel header
|
1998-08-21 22:29:58 +00:00
|
|
|
files. To use kernel headers not from /usr/include/linux, use the
|
|
|
|
configure option --with-headers.])
|
|
|
|
fi
|
1999-05-26 23:37:38 +00:00
|
|
|
|
|
|
|
# If the user gave a minimal version number test whether the available
|
2000-06-13 03:49:12 +00:00
|
|
|
# kernel headers are young enough. Additionally we have minimal
|
2004-07-02 06:45:08 +00:00
|
|
|
# kernel versions for some architectures. If a previous configure fragment
|
|
|
|
# set arch_minimum_kernel already, let that override our defaults here.
|
|
|
|
# Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
|
|
|
|
# if appropriate too.
|
Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.
In <https://sourceware.org/ml/libc-alpha/2016-01/msg00885.html> I
proposed a minimum Linux kernel version of 3.2 for glibc 2.24, since
Linux 2.6.32 has reached EOL.
In the discussion in February, some concerns were expressed about
compatibility with OpenVZ containers. It's not clear that these are
real issues, given OpenVZ backporting kernel features and faking the
kernel version for guest software, as discussed in
<https://sourceware.org/ml/libc-alpha/2016-02/msg00278.html>. It's
also not clear that supporting running GNU/Linux distributions from
late 2016 (at the earliest) on a kernel series from 2009 is a sensible
expectation. However, as an interim step, this patch increases the
requirement everywhere except x86 / x86_64 (since the controversy was
only about those architectures); the special caveats and settings can
easily be removed later when we're ready to increase the requirements
on x86 / x86_64 (and if someone would like to raise the issue on LWN
as suggested in the previous discussion, that would be welcome). 3.2
kernel headers are required everywhere by this patch.
(x32 already requires 3.4 or later, so is unaffected by this patch.)
As usual for such a change, this patch only changes the configure
scripts and associated documentation. The intent is to follow up with
removal of dead __LINUX_KERNEL_VERSION conditionals. Each __ASSUME_*
or other macro that becomes dead can then be removed independently.
Tested for x86_64 and x86.
* sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION):
Define to 3.2.0.
(arch_minimum_kernel): Likewise.
* sysdeps/unix/sysv/linux/configure: Regenerated.
* sysdeps/unix/sysv/linux/i386/configure.ac (arch_minimum_kernel):
Define to 2.6.32.
* sysdeps/unix/sysv/linux/i386/configure: Regenerated.
* sysdeps/unix/sysv/linux/x86_64/64/configure.ac
(arch_minimum_kernel): Define to 2.6.32.
* sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerated.
* README: Document Linux 3.2 requirement.
* manual/install.texi (Linux): Document Linux 3.2 headers
requirement.
* INSTALL: Regenerated.
2016-02-24 17:15:12 +00:00
|
|
|
test -n "$arch_minimum_kernel" || arch_minimum_kernel=3.2.0
|
2000-06-13 03:49:12 +00:00
|
|
|
if test -n "$minimum_kernel"; then
|
2000-06-13 06:22:36 +00:00
|
|
|
changequote(,)
|
|
|
|
user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
|
|
|
|
arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
|
|
|
|
changequote([,])
|
|
|
|
if test $user_version -lt $arch_version; then
|
2000-06-13 03:49:12 +00:00
|
|
|
AC_MSG_WARN([minimum kernel version reset to $arch_minimum_kernel])
|
|
|
|
minimum_kernel=$arch_minimum_kernel
|
|
|
|
fi
|
|
|
|
else
|
2012-05-14 22:22:52 +00:00
|
|
|
minimum_kernel=$arch_minimum_kernel
|
2000-06-13 03:49:12 +00:00
|
|
|
fi
|
|
|
|
|
2012-05-14 22:22:52 +00:00
|
|
|
AC_MSG_CHECKING(for kernel header at least $minimum_kernel)
|
1999-05-26 23:37:38 +00:00
|
|
|
changequote(,)dnl
|
2012-05-14 22:22:52 +00:00
|
|
|
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/'`;
|
1999-05-26 23:37:38 +00:00
|
|
|
changequote([,])dnl
|
2021-05-22 02:42:48 +00:00
|
|
|
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[#include <linux/version.h>
|
1999-05-26 23:37:38 +00:00
|
|
|
#if LINUX_VERSION_CODE < $decnum
|
2014-07-04 03:35:42 +00:00
|
|
|
# error kernel headers too old
|
2021-05-22 02:42:48 +00:00
|
|
|
#endif]], [[]])], [libc_minimum_kernel=ok], [libc_minimum_kernel='too old!'])
|
2012-05-14 22:22:52 +00:00
|
|
|
AC_MSG_RESULT($libc_minimum_kernel)
|
|
|
|
if test "$libc_minimum_kernel" = ok; then
|
|
|
|
AC_DEFINE_UNQUOTED(__LINUX_KERNEL_VERSION, $decnum)
|
|
|
|
AC_DEFINE_UNQUOTED(__ABI_TAG_VERSION, $abinum)
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([*** The available kernel headers are older than the requested
|
1999-05-26 23:37:38 +00:00
|
|
|
*** compatible kernel version])
|
|
|
|
fi
|
|
|
|
|
1998-08-21 22:29:58 +00:00
|
|
|
if test -n "$sysheaders"; then
|
2000-01-27 01:31:24 +00:00
|
|
|
CPPFLAGS=$OLD_CPPFLAGS
|
1996-06-10 09:41:16 +00:00
|
|
|
fi
|
1996-12-07 03:30:25 +00:00
|
|
|
|
2002-05-19 18:37:21 +00:00
|
|
|
if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
|
|
|
|
if test $enable_sanity = yes; then
|
|
|
|
echo "\
|
|
|
|
*** On GNU/Linux systems the GNU C Library should not be installed into
|
|
|
|
*** /usr/local since this might make your system totally unusable.
|
|
|
|
*** We strongly advise to use a different prefix. For details read the FAQ.
|
2002-07-28 22:43:25 +00:00
|
|
|
*** If you really mean to do this, run configure again using the extra
|
2002-05-19 18:37:21 +00:00
|
|
|
*** parameter \`--disable-sanity-checks'."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "\
|
|
|
|
*** WARNING: Do you really want to install the GNU C Library into /usr/local?
|
|
|
|
*** This might make your system totally unusable, for details read the FAQ."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
1999-12-04 18:05:55 +00:00
|
|
|
# One Linux we use ldconfig.
|
|
|
|
use_ldconfig=yes
|
1998-03-29 17:03:23 +00:00
|
|
|
|
1998-12-02 13:44:40 +00:00
|
|
|
if test $host = $build; then
|
|
|
|
# If $prefix/include/{net,scsi} are symlinks, make install will
|
|
|
|
# clobber what they're linked to (probably a kernel tree).
|
|
|
|
# test -L ought to work on all Linux boxes.
|
|
|
|
if test "x$prefix" != xNONE; then
|
|
|
|
ac_prefix=$prefix
|
|
|
|
else
|
|
|
|
ac_prefix=$ac_default_prefix
|
|
|
|
fi
|
|
|
|
AC_MSG_CHECKING([for symlinks in ${ac_prefix}/include])
|
1998-12-04 20:58:15 +00:00
|
|
|
ac_message=
|
1998-12-02 13:44:40 +00:00
|
|
|
if test -L ${ac_prefix}/include/net; then
|
1998-12-04 20:58:15 +00:00
|
|
|
ac_message="$ac_message
|
|
|
|
${ac_prefix}/include/net is a symlink"
|
1998-12-02 13:44:40 +00:00
|
|
|
fi
|
|
|
|
if test -L ${ac_prefix}/include/scsi; then
|
1998-12-04 20:58:15 +00:00
|
|
|
ac_message="$ac_message
|
1998-12-02 13:44:40 +00:00
|
|
|
${ac_prefix}/include/scsi is a symlink"
|
|
|
|
fi
|
1998-12-04 20:58:15 +00:00
|
|
|
if test -n "$ac_message"; then
|
|
|
|
AC_MSG_ERROR([$ac_message
|
1998-11-28 23:37:49 +00:00
|
|
|
\`make install' will destroy the target of the link(s).
|
|
|
|
Delete the links and re-run configure, or better still, move the entire
|
1998-12-02 13:44:40 +00:00
|
|
|
${ac_prefix}/include directory out of the way.])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(ok)
|
|
|
|
fi
|
1998-11-28 23:37:49 +00:00
|
|
|
fi
|
2004-07-06 04:26:42 +00:00
|
|
|
|
|
|
|
# We have inlined syscalls.
|
|
|
|
AC_DEFINE(HAVE_INLINED_SYSCALLS)
|