The minimum kernel version can be configured by passing in the --enable-kernel
parameter to glibc's configure
script.
- Arch Linux - Linux 4.4 (release year: 2016)
...
--enable-kernel=4.4
...
Source: https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/blob/main/PKGBUILD#L55
- NixOS - Linux 3.10.0 (release year: 2013)
"--enable-kernel=3.10.0" # RHEL 7 and derivatives, seems oldest still supported kernel
- Ubuntu - Linux 3.2 (release year: 2012)
...
MIN_KERNEL_SUPPORTED := 3.2
...
with_headers = ... --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
...
Source: https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/tree/debian/sysdeps/linux.mk#n4 (lines 4 and and 30)
- Debian - Linux 3.2 (release year: 2012)
...
MIN_KERNEL_SUPPORTED := 3.2
...
with_headers = ... --enable-kernel=$(call xx,MIN_KERNEL_SUPPORTED)
...
Source: https://salsa.debian.org/glibc-team/glibc/-/blob/sid/debian/sysdeps/linux.mk#L4 (lines 4 and 30)
- Red Hat - Linux 3.2 (release year: 2012)
...
%global enablekernel 3.2
...
EnableKernel="--enable-kernel=%{enablekernel}"
...
--with-headers=%{_prefix}/include $EnableKernel \
...
Source: https://src.fedoraproject.org/rpms/glibc/blob/rawhide/f/glibc.spec#_318
- Gentoo - Linux 3.2 (relese year: 2012)
...
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
...
myconf+=( --enable-kernel=${MIN_KERN_VER} )
...
Source: https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-libs/glibc/glibc-2.37-r3.ebuild#n33
- GNU Guix - Linux 3.2 (release year: 2012)
;; This is the default for most architectures as of GNU libc 2.26,
;; but we specify it explicitly for clarity and consistency. See
;; "kernel-features.h" in the GNU libc for details.
"--enable-kernel=3.2.0"
Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/base.scm#n858
The musl
library seems to only require Linux >= 2.6.39 - althought it's not yet clear to me whether this is a run-time or a compile-time requirement.
musl is built on the Linux syscall layer. Linux kernel >=2.6.39 is necessary for POSIX conformant behaviour, older kernels will work with varying degrees of non-conformance, 2.4 kernels will only work for simple single-threaded applications.