mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Require Linux kernel headers from "make headers_install", >= 2.6.19.1.
This commit is contained in:
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2012-02-27 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* manual/install.texi (--with-headers): Describe headers as
|
||||||
|
interface headers, not private headers.
|
||||||
|
(Specific advice for GNU/Linux systems): Describe use of headers
|
||||||
|
from "make headers_install", not private headers from older
|
||||||
|
kernels.
|
||||||
|
* INSTALL: Regenerated.
|
||||||
|
* sysdeps/unix/sysv/linux/configure.in (LIBC_LINUX_VERSION):
|
||||||
|
Change to 2.6.19.
|
||||||
|
* sysdeps/unix/sysv/linux/configure: Regenerated.
|
||||||
|
|
||||||
2012-02-27 Joseph Myers <joseph@codesourcery.com>
|
2012-02-27 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* manual/llio.texi (fclean): Remove documentation.
|
* manual/llio.texi (fclean): Remove documentation.
|
||||||
|
62
INSTALL
62
INSTALL
@ -59,9 +59,10 @@ will be used, and CFLAGS sets optimization options for the compiler.
|
|||||||
|
|
||||||
`--with-headers=DIRECTORY'
|
`--with-headers=DIRECTORY'
|
||||||
Look for kernel header files in DIRECTORY, not `/usr/include'.
|
Look for kernel header files in DIRECTORY, not `/usr/include'.
|
||||||
Glibc needs information from the kernel's private header files.
|
Glibc needs information from the kernel's header files describing
|
||||||
Glibc will normally look in `/usr/include' for them, but if you
|
the interface to the kernel. Glibc will normally look in
|
||||||
specify this option, it will look in DIRECTORY instead.
|
`/usr/include' for them, but if you specify this option, it will
|
||||||
|
look in DIRECTORY instead.
|
||||||
|
|
||||||
This option is primarily of use on a system where the headers in
|
This option is primarily of use on a system where the headers in
|
||||||
`/usr/include' come from an older version of glibc. Conflicts can
|
`/usr/include' come from an older version of glibc. Conflicts can
|
||||||
@ -347,37 +348,34 @@ Specific advice for GNU/Linux systems
|
|||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
If you are installing GNU libc on a GNU/Linux system, you need to have
|
If you are installing GNU libc on a GNU/Linux system, you need to have
|
||||||
the header files from a 2.2 or newer kernel around for reference. For
|
the header files from a 2.6.19.1 or newer kernel around for reference.
|
||||||
some architectures, like ia64, sh and hppa, you need at least headers
|
These headers must be installed using `make headers_install'; the
|
||||||
from kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64). You do not need to
|
headers present in the kernel source directory are not suitable for
|
||||||
use that kernel, just have its headers where glibc can access at them.
|
direct use by GNU libc. You do not need to use that kernel, just have
|
||||||
The easiest way to do this is to unpack it in a directory such as
|
its headers installed where glibc can access them, referred to here as
|
||||||
`/usr/src/linux-2.2.1'. In that directory, run `make config' and
|
INSTALL-DIRECTORY. The easiest way to do this is to unpack it in a
|
||||||
accept all the defaults. Then run `make include/linux/version.h'.
|
directory such as `/usr/src/linux-VERSION'. In that directory, run
|
||||||
Finally, configure glibc with the option
|
`make headers_install INSTALL_HDR_PATH=INSTALL-DIRECTORY'. Finally,
|
||||||
`--with-headers=/usr/src/linux-2.2.1/include'. Use the most recent
|
configure glibc with the option
|
||||||
kernel you can get your hands on.
|
`--with-headers=INSTALL-DIRECTORY/include'. Use the most recent kernel
|
||||||
|
you can get your hands on. (If you are cross-compiling GNU libc, you
|
||||||
An alternate tactic is to unpack the 2.2 kernel and run `make
|
need to specify `ARCH=ARCHITECTURE' in the `make headers_install'
|
||||||
config' as above; then, rename or delete `/usr/include', create a new
|
command, where ARCHITECTURE is the architecture name used by the Linux
|
||||||
`/usr/include', and make symbolic links of `/usr/include/linux' and
|
kernel, such as `x86' or `powerpc'.)
|
||||||
`/usr/include/asm' into the kernel sources. You can then configure
|
|
||||||
glibc with no special options.
|
|
||||||
|
|
||||||
After installing GNU libc, you may need to remove or rename
|
After installing GNU libc, you may need to remove or rename
|
||||||
`/usr/include/linux' and `/usr/include/asm', and replace them with
|
directories such as `/usr/include/linux' and `/usr/include/asm', and
|
||||||
copies of `include/linux' and `include/asm-$ARCHITECTURE' taken from
|
replace them with copies of directories such as `linux' and `asm' from
|
||||||
the Linux source package which supplied kernel headers for building the
|
`INSTALL-DIRECTORY/include'. All directories present in
|
||||||
library. ARCHITECTURE will be the machine architecture for which the
|
`INSTALL-DIRECTORY/include' should be copied, except that GNU libc
|
||||||
library was built, such as `i386' or `alpha'. You do not need to do
|
provides its own version of `/usr/include/scsi'; the files provided by
|
||||||
this if you did not specify an alternate kernel header source using
|
the kernel should be copied without replacing those provided by GNU
|
||||||
`--with-headers'. The intent here is that these directories should be
|
libc. The `linux', `asm' and `asm-generic' directories are required to
|
||||||
copies of, *not* symlinks to, the kernel headers used to build the
|
compile programs using GNU libc; the other directories describe
|
||||||
library.
|
interfaces to the kernel but are not required if not compiling programs
|
||||||
|
using those interfaces. You do not need to copy kernel headers if you
|
||||||
Note that `/usr/include/net' and `/usr/include/scsi' should *not* be
|
did not specify an alternate kernel header source using
|
||||||
symlinks into the kernel sources. GNU libc provides its own versions
|
`--with-headers'.
|
||||||
of these files.
|
|
||||||
|
|
||||||
GNU/Linux expects some components of the libc installation to be in
|
GNU/Linux expects some components of the libc installation to be in
|
||||||
`/lib' and some in `/usr/lib'. This is handled automatically if you
|
`/lib' and some in `/usr/lib'. This is handled automatically if you
|
||||||
|
@ -79,8 +79,9 @@ directory if that option is specified, or @file{/usr/local} otherwise.
|
|||||||
|
|
||||||
@item --with-headers=@var{directory}
|
@item --with-headers=@var{directory}
|
||||||
Look for kernel header files in @var{directory}, not
|
Look for kernel header files in @var{directory}, not
|
||||||
@file{/usr/include}. Glibc needs information from the kernel's private
|
@file{/usr/include}. Glibc needs information from the kernel's header
|
||||||
header files. Glibc will normally look in @file{/usr/include} for them,
|
files describing the interface to the kernel. Glibc will normally
|
||||||
|
look in @file{/usr/include} for them,
|
||||||
but if you specify this option, it will look in @var{DIRECTORY} instead.
|
but if you specify this option, it will look in @var{DIRECTORY} instead.
|
||||||
|
|
||||||
This option is primarily of use on a system where the headers in
|
This option is primarily of use on a system where the headers in
|
||||||
@ -393,39 +394,37 @@ patches, although we try to avoid this.
|
|||||||
@appendixsec Specific advice for GNU/Linux systems
|
@appendixsec Specific advice for GNU/Linux systems
|
||||||
@cindex kernel header files
|
@cindex kernel header files
|
||||||
|
|
||||||
If you are installing GNU libc on a GNU/Linux system, you need to have the
|
If you are installing GNU libc on a GNU/Linux system, you need to have
|
||||||
header files from a 2.2 or newer kernel around for reference. For some
|
the header files from a 2.6.19.1 or newer kernel around for reference.
|
||||||
architectures, like ia64, sh and hppa, you need at least headers from
|
These headers must be installed using @samp{make headers_install}; the
|
||||||
kernel 2.3.99 (sh and hppa) or 2.4.0 (ia64). You do not need to use
|
headers present in the kernel source directory are not suitable for
|
||||||
that kernel, just have its headers where glibc can access at them. The
|
direct use by GNU libc. You do not need to use that kernel, just have
|
||||||
easiest way to do this is to unpack it in a directory such as
|
its headers installed where glibc can access them, referred to here as
|
||||||
@file{/usr/src/linux-2.2.1}. In that directory, run @samp{make config}
|
@var{install-directory}. The easiest way to do this is to unpack it
|
||||||
and accept all the defaults. Then run @samp{make
|
in a directory such as @file{/usr/src/linux-@var{version}}. In that
|
||||||
include/linux/version.h}. Finally, configure glibc with the option
|
directory, run @samp{make headers_install
|
||||||
@samp{--with-headers=/usr/src/linux-2.2.1/include}. Use the most recent
|
INSTALL_HDR_PATH=@var{install-directory}}. Finally, configure glibc
|
||||||
kernel you can get your hands on.
|
with the option @samp{--with-headers=@var{install-directory}/include}.
|
||||||
|
Use the most recent kernel you can get your hands on. (If you are
|
||||||
An alternate tactic is to unpack the 2.2 kernel and run @samp{make
|
cross-compiling GNU libc, you need to specify
|
||||||
config} as above; then, rename or delete @file{/usr/include}, create a
|
@samp{ARCH=@var{architecture}} in the @samp{make headers_install}
|
||||||
new @file{/usr/include}, and make symbolic links of
|
command, where @var{architecture} is the architecture name used by the
|
||||||
@file{/usr/include/linux} and @file{/usr/include/asm} into the kernel
|
Linux kernel, such as @samp{x86} or @samp{powerpc}.)
|
||||||
sources. You can then configure glibc with no special options.
|
|
||||||
|
|
||||||
After installing GNU libc, you may need to remove or rename
|
After installing GNU libc, you may need to remove or rename
|
||||||
@file{/usr/include/linux} and @file{/usr/include/asm}, and replace them
|
directories such as @file{/usr/include/linux} and
|
||||||
with copies of @file{include/linux} and
|
@file{/usr/include/asm}, and replace them with copies of directories
|
||||||
@file{include/asm-$@var{ARCHITECTURE}} taken from the Linux source
|
such as @file{linux} and @file{asm} from
|
||||||
package which supplied kernel headers for building the library.
|
@file{@var{install-directory}/include}. All directories present in
|
||||||
@var{ARCHITECTURE} will be the machine architecture for which the
|
@file{@var{install-directory}/include} should be copied, except that
|
||||||
library was built, such as @samp{i386} or @samp{alpha}. You do not need
|
GNU libc provides its own version of @file{/usr/include/scsi}; the
|
||||||
to do this if you did not specify an alternate kernel header source
|
files provided by the kernel should be copied without replacing those
|
||||||
using @samp{--with-headers}. The intent here is that these directories
|
provided by GNU libc. The @file{linux}, @file{asm} and
|
||||||
should be copies of, @strong{not} symlinks to, the kernel headers used to
|
@file{asm-generic} directories are required to compile programs using
|
||||||
build the library.
|
GNU libc; the other directories describe interfaces to the kernel but
|
||||||
|
are not required if not compiling programs using those interfaces.
|
||||||
Note that @file{/usr/include/net} and @file{/usr/include/scsi} should
|
You do not need to copy kernel headers if you did not specify an
|
||||||
@strong{not} be symlinks into the kernel sources. GNU libc provides its
|
alternate kernel header source using @samp{--with-headers}.
|
||||||
own versions of these files.
|
|
||||||
|
|
||||||
GNU/Linux expects some components of the libc installation to be in
|
GNU/Linux expects some components of the libc installation to be in
|
||||||
@file{/lib} and some in @file{/usr/lib}. This is handled automatically
|
@file{/lib} and some in @file{/usr/lib}. This is handled automatically
|
||||||
|
18
sysdeps/unix/sysv/linux/configure
vendored
18
sysdeps/unix/sysv/linux/configure
vendored
@ -242,33 +242,33 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
|
|||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking installed Linux kernel header files" >&5
|
||||||
$as_echo_n "checking installed Linux kernel header files... " >&6; }
|
$as_echo_n "checking installed Linux kernel header files... " >&6; }
|
||||||
if ${libc_cv_linux2010+:} false; then :
|
if ${libc_cv_linux2619+:} false; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
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 !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
|
#if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 6 *256+ 19) /* 2.6.19 */
|
||||||
eat flaming death
|
eat flaming death
|
||||||
#endif
|
#endif
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||||
$EGREP "eat flaming death" >/dev/null 2>&1; then :
|
$EGREP "eat flaming death" >/dev/null 2>&1; then :
|
||||||
libc_cv_linux2010='TOO OLD!'
|
libc_cv_linux2619='TOO OLD!'
|
||||||
else
|
else
|
||||||
libc_cv_linux2010='2.0.10 or later'
|
libc_cv_linux2619='2.6.19 or later'
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux2010" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_linux2619" >&5
|
||||||
$as_echo "$libc_cv_linux2010" >&6; }
|
$as_echo "$libc_cv_linux2619" >&6; }
|
||||||
if test "$libc_cv_linux2010" != '2.0.10 or later'; then
|
if test "$libc_cv_linux2619" != '2.6.19 or later'; then
|
||||||
as_fn_error $? "GNU libc requires kernel header files from
|
as_fn_error $? "GNU libc requires kernel header files from
|
||||||
Linux 2.0.10 or later to be installed before configuring.
|
Linux 2.6.19 or later to be installed before configuring.
|
||||||
The kernel header files are found usually in /usr/include/asm and
|
The kernel header files are found usually in /usr/include/asm and
|
||||||
/usr/include/linux; make sure these directories use files from
|
/usr/include/linux; make sure these directories use files from
|
||||||
Linux 2.0.10 or later. This check uses <linux/version.h>, so
|
Linux 2.6.19 or later. This check uses <linux/version.h>, so
|
||||||
make sure that file was built correctly when installing the kernel header
|
make sure that file was built correctly when installing the kernel header
|
||||||
files. To use kernel headers not from /usr/include/linux, use the
|
files. To use kernel headers not from /usr/include/linux, use the
|
||||||
configure option --with-headers." "$LINENO" 5
|
configure option --with-headers." "$LINENO" 5
|
||||||
|
@ -5,7 +5,7 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|||||||
# existing system library, because we are the only system library.
|
# existing system library, because we are the only system library.
|
||||||
inhibit_glue=yes
|
inhibit_glue=yes
|
||||||
|
|
||||||
define([LIBC_LINUX_VERSION],[2.0.10])dnl
|
define([LIBC_LINUX_VERSION],[2.6.19])dnl
|
||||||
if test -n "$sysheaders"; then
|
if test -n "$sysheaders"; then
|
||||||
OLD_CPPFLAGS=$CPPFLAGS
|
OLD_CPPFLAGS=$CPPFLAGS
|
||||||
CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
|
CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
|
||||||
|
Reference in New Issue
Block a user