# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) PKG_NAME="glibc" PKG_VERSION="2.36" PKG_SHA256="1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75" PKG_LICENSE="GPL" PKG_SITE="https://www.gnu.org/software/libc/" PKG_URL="https://ftp.gnu.org/pub/gnu/glibc/${PKG_NAME}-${PKG_VERSION}.tar.xz" PKG_DEPENDS_TARGET="ccache:host autotools:host linux:host gcc:bootstrap pigz:host Python3:host" PKG_DEPENDS_INIT="glibc" PKG_LONGDESC="The Glibc package contains the main C library." PKG_BUILD_FLAGS="+bfd -gold" case "${DEVICE}" in *) OPT_ENABLE_KERNEL=5.15.0 ;; esac PKG_CONFIGURE_OPTS_TARGET="BASH_SHELL=/bin/sh \ ac_cv_path_PERL=no \ ac_cv_prog_MAKEINFO= \ --libexecdir=/usr/lib/glibc \ --cache-file=config.cache \ --disable-profile \ --disable-sanity-checks \ --enable-add-ons \ --enable-bind-now \ --with-elf \ --with-tls \ --with-__thread \ --with-binutils=${BUILD}/toolchain/bin \ --with-headers=${SYSROOT_PREFIX}/usr/include \ --enable-kernel=${OPT_ENABLE_KERNEL} \ --without-cvs \ --without-gd \ --disable-build-nscd \ --disable-nscd \ --disable-timezone-tools" if build_with_debug; then PKG_CONFIGURE_OPTS_TARGET+=" --enable-debug" else PKG_CONFIGURE_OPTS_TARGET+=" --disable-debug" fi post_unpack() { find "${PKG_BUILD}" -type f -name '*.py' -exec sed -e '1s,^#![[:space:]]*/usr/bin/python.*,#!/usr/bin/env python3,' -i {} \; } pre_configure_target() { # Filter out some problematic *FLAGS export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-ffast-math||g") export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-Ofast|-O2|g") export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-O.|-O2|g") export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-Wunused-but-set-variable||g") export CFLAGS="${CFLAGS} -Wno-unused-variable" if [ -n "${PROJECT_CFLAGS}" ]; then export CFLAGS=$(echo ${CFLAGS} | sed -e "s|${PROJECT_CFLAGS}||g") fi export LDFLAGS=$(echo ${LDFLAGS} | sed -e "s|-ffast-math||g") export LDFLAGS=$(echo ${LDFLAGS} | sed -e "s|-Ofast|-O2|g") export LDFLAGS=$(echo ${LDFLAGS} | sed -e "s|-O.|-O2|g") export LDFLAGS=$(echo ${LDFLAGS} | sed -e "s|-Wl,--as-needed||") unset LD_LIBRARY_PATH # set some CFLAGS we need export CFLAGS="${CFLAGS} -g -fno-stack-protector" export BUILD_CC=${HOST_CC} export OBJDUMP_FOR_HOST=objdump cat >config.cache <configparms <