version = "2.41" revision = 1 metadata = meta( description = "GNU C library", license = "LGPL-2.1-or-later", website = "https://www.gnu.org/software/libc/", ) source = tarball_source( url = f"https://ftp.gnu.org/gnu/glibc/glibc-{version}.tar.xz", sha256 = "a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901", strip_components = 1, ) host_deps = ["binutils", "gcc-bootstrap"] deps = ["linux-headers"] build_if = options.libc == "glibc" def configure(ctx): autotools_configure(ctx, [ "--build=" + options.target_triple, "--with-headers=" + ctx.sysroot / options.prefix / "include", "--enable-kernel=5.4", "--enable-bind-now", "--enable-stack-protector=strong", "--enable-cet", "--disable-werror", "--disable-profile", "--disable-nscd", "--without-selinux", "--without-gd", "libc_cv_slibdir=/lib", "libc_cv_rtlddir=/lib", "libc_cv_forced_unwind=yes", ]) _, build, install = autotools()