Glibc

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

The GNU libc C library is the default C library included with Gentoo Linux.

Other C libraries are available in Gentoo including dev-libs/dietlibc and sys-libs/musl.

Installation

USE flags

USE flags for sys-libs/glibc GNU libc C library

+clone3 Enable the new clone3 syscall within glibc. Can be disabled to allow compatibility with older Electron applications.
+crypt build and install libcrypt and crypt.h
+multiarch enable optimizations for multiple CPU architectures (detected at runtime)
+ssp protect stack of glibc internals
+static-libs Build static versions of dynamic libraries as well
audit Enable support for Linux audit subsystem using sys-process/audit
caps Use Linux capabilities library to control privilege
cet Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)
compile-locales build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow
custom-cflags Build with user-specified CFLAGS (unsupported)
debug When USE=hardened, allow fortify/stack violations to dump core (SIGABRT) and not kill self (SIGKILL)
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
experimental-loong Add experimental LoongArch patchset
gd build memusage and memusagestat tools
hash-sysv-compat enable sysv linker hashes in glibc for compatibility with binary software (EAC via wine/proton)
headers-only Install only C headers instead of whole package. Mainly used by sys-devel/crossdev for toolchain bootstrap.
multilib On 64bit systems, if you want to be able to compile 32bit and 64bit binaries
multilib-bootstrap Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch.
nscd Build, and enable support for, the Name Service Cache Daemon
perl Install additional scripts written in Perl
profile Add support for software performance analysis (will likely vary from ebuild to ebuild)
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
stack-realign Realign the stack in the 32-bit build for compatibility with older binaries at some performance cost
static-pie Enable static PIE support (runtime files for -static-pie gcc option).
suid Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
systemtap enable systemtap static probe points
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
vanilla Do not add extra patches which change default behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically

Upgrades

When glibc is upgraded it is wise to reload the running init system.

OpenRC

root #telinit u

systemd

root #systemctl daemon-reload

Usage

Glibc locale system

See also
See the Localization/Guide article for more information.
See also
See the Configure locales section (Gentoo Handbook) for more information.

See also