<commit_before>#!/bin/sh

[ -z "${GLIBC_VER}" ] && exit 1

(
    PKG=glibc
    PKG_VERSION=${GLIBC_VER}
    PKG_SUBDIR=${PKG}-${PKG_VERSION}
    PKG_FILE=${PKG}-${PKG_VERSION}.tar.bz2
    PKG_URL="ftp://ftp.funet.fi/pub/gnu/prep/${PKG}/${PKG_FILE}"
    PKG_DEPS="texinfo gcc-stage1"

    if ! IsPkgInstalled
    then
        CheckDependencies

        GetSources
        UnpackSources
        PrepareBuild

        SetGlibcBuildFlags
        SetCrossToolchainPath
        PrepareGlibcConfigureOpts
        SetCrossToolchainVariables
        unset cxx CXX
        ConfigurePkg \
            ${LXE_CONFIGURE_OPTS} \
            ${GLIBC_CONFIGURE_OPTS}

        BuildPkg
        IsPkgVersionGreaterOrEqualTo "2.16.0" && \
            InstallPkg install DESTDIR="${SYSROOT}" || \
            InstallPkg install install_root="${SYSROOT}"

        CleanPkgBuildDir
        CleanPkgSrcDir
    fi
)
<commit_msg>glibc: workaround for rare problem of build<commit_after>#!/bin/sh

[ -z "${GLIBC_VER}" ] && exit 1

(
    PKG=glibc
    PKG_VERSION=${GLIBC_VER}
    PKG_SUBDIR=${PKG}-${PKG_VERSION}
    PKG_FILE=${PKG}-${PKG_VERSION}.tar.bz2
    PKG_URL="ftp://ftp.funet.fi/pub/gnu/prep/${PKG}/${PKG_FILE}"
    PKG_DEPS="texinfo gcc-stage1"

    if ! IsPkgInstalled
    then
        CheckDependencies

        GetSources
        UnpackSources
        PrepareBuild

        SetGlibcBuildFlags
        SetCrossToolchainPath
        PrepareGlibcConfigureOpts
        SetCrossToolchainVariables
        unset cxx CXX
        ConfigurePkg \
            ${LXE_CONFIGURE_OPTS} \
            ${GLIBC_CONFIGURE_OPTS}

        # Workaround for rare problem of build of old glibc versions.
        # Search for "glibc-2.*/shlib.lds:.*: syntax error" bug for
        # more details.
        BuildPkg -i -k

        BuildPkg
        IsPkgVersionGreaterOrEqualTo "2.16.0" && \
            InstallPkg install DESTDIR="${SYSROOT}" || \
            InstallPkg install install_root="${SYSROOT}"

        CleanPkgBuildDir
        CleanPkgSrcDir
    fi
)

{'fraction_non_alphanumeric': 0.10435212660731949, 'fraction_numerical': 0.00741839762611276, 'mean_word_length': 2.2009493670886076, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1142989', 'n_tokens_mistral': 720, 'n_tokens_neox': 695, 'n_words': 110}