#!/bin/bash set -e # glibc build script # This script configures and builds glibc with standard options # Change to the source directory cd sources/glibc # Create a separate build directory as required by glibc mkdir -p build cd build # Configure glibc with standard options ../configure \ --prefix=${PREFIX} \ --libdir=${LIBDIR} \ --libexecdir=${LIBEXECDIR} \ --includedir=${INCLUDEDIR} \ --datadir=${DATADIR} \ --mandir=${MANDIR} \ --infodir=${INFODIR} \ --localstatedir=${DESTDIR}${LOCALSTATEDIR} \ --sysconfdir=${DESTDIR}${SYSCONFIGDIR} \ --enable-add-ons \ --enable-stack-protector=strong \ --enable-bind-now \ --enable-fortify-source \ --disable-werror \ --with-headers=/usr/include # Build using all available threads make -j$(nproc) echo "glibc build completed successfully"