sys-libs/glibc: Sync with Gentoo

It's from Gentoo commit 9074a3d84995540c2c814c713e7a67cb01cf0323.
This commit is contained in:
Flatcar Buildbot 2025-03-17 07:12:04 +00:00 committed by Krzesimir Nowak
parent 9dd26e40da
commit 2632347bf7
6 changed files with 1799 additions and 36 deletions

View File

@ -23,10 +23,11 @@ DIST glibc-2.38-patches-13.tar.xz 92708 BLAKE2B b2f05a793c92ea0b7901d2124fcd968f
DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900 DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4dd89af4d26fa5c4e4cf266f19c2746b44d797ce54739d86499e74cf334aaf311bcf6e30120fd7748453e653f SHA512 a6dd5e42dcd63d58e2820c783522c8c895890b6e8c8e6c83b025553de0cc77cdf227e7044e431ead98c89c68a9ce4dd63509b47e647775fb2075f011849c1900
DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc95b7f521ffb27686a9109fe92e0458e903a24e763db17631b8ae6c1e8de7add2a11979b970689b2378aeb6ef29da7ceb6 SHA512 9daf2c57d178c7ce9d98ee454f680280738b37571bbbecc1724282e4866df29b78e60de40ad81a6efcc0a75b45d08148cb1a5f942ae7e308ae6fa63f9671b7de DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc95b7f521ffb27686a9109fe92e0458e903a24e763db17631b8ae6c1e8de7add2a11979b970689b2378aeb6ef29da7ceb6 SHA512 9daf2c57d178c7ce9d98ee454f680280738b37571bbbecc1724282e4866df29b78e60de40ad81a6efcc0a75b45d08148cb1a5f942ae7e308ae6fa63f9671b7de
DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2 DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
DIST glibc-2.40-patches-5.tar.xz 87376 BLAKE2B b09b9d2c8e45c0b494223cd01effb14ef205b030f2aeb76e1d7d289997258c1e46d85f8f4ad761e22afc35b1f4747fbca51d7caf252181c7b054b6a3e6bd2bfe SHA512 bf4776c27e5d962d2774afbed2236996a712a6127e5fdccd051af212d86a7e699a932cf4cb22f5516d513b9490b91d5e145727035e845cd4ef290985ac3dc524
DIST glibc-2.40-patches-8.tar.xz 112020 BLAKE2B 17f5a3e5486aa570cb4d9103a84b649af9731bc398a4ff65d3d24c8912215dc7f5f2d6fa9a0222c514374a132b96796e8926a5cc31c87b326bf6d1a39772bd7a SHA512 97a28822f97d1c06773953750a8d9a38a6bd9ce488f4c4d5f0752b573591cbdc84dfbbb277e3fb8e5664c56596efc093fd83a78e4c47bb9c11cafe942b13a0f1 DIST glibc-2.40-patches-8.tar.xz 112020 BLAKE2B 17f5a3e5486aa570cb4d9103a84b649af9731bc398a4ff65d3d24c8912215dc7f5f2d6fa9a0222c514374a132b96796e8926a5cc31c87b326bf6d1a39772bd7a SHA512 97a28822f97d1c06773953750a8d9a38a6bd9ce488f4c4d5f0752b573591cbdc84dfbbb277e3fb8e5664c56596efc093fd83a78e4c47bb9c11cafe942b13a0f1
DIST glibc-2.40-patches-9.tar.xz 187952 BLAKE2B 48aecbdcc9ddc0b1139de1934c26952d85c557da795b400ab5b8308afce08d13583c0d18dfacb46d0e63aa4da64d3c9c8fd242ad87a9ae0966022b5da471158b SHA512 a068f9a4af6b47b1ec572378fcac0db464081d277d697914f54028b174e43eb17b30e4e1026bff365be79ddb41ffb81167c684be9f95abb22df03d70aaa66333
DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885 DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
DIST glibc-2.41-patches-1.tar.xz 17560 BLAKE2B dc4e39cb5605867b44c2308a8d6d6c0a662656b80a0aa2734f488e2cc22e26c948177eeb80ff6c79d82925b4dbd146a4d78646879c6e32fd60f817fb0d9ae092 SHA512 94da2092e49ee827d7558bcbfa8ebcbb9f81ed68848221d139039ea788cef57375ccfa61498bc73c6e83050681990d3968791a5f90514de12e45c10baef31d1e DIST glibc-2.41-patches-1.tar.xz 17560 BLAKE2B dc4e39cb5605867b44c2308a8d6d6c0a662656b80a0aa2734f488e2cc22e26c948177eeb80ff6c79d82925b4dbd146a4d78646879c6e32fd60f817fb0d9ae092 SHA512 94da2092e49ee827d7558bcbfa8ebcbb9f81ed68848221d139039ea788cef57375ccfa61498bc73c6e83050681990d3968791a5f90514de12e45c10baef31d1e
DIST glibc-2.41-patches-2.tar.xz 54320 BLAKE2B cd0779c452159c90adf165da18e61699dc5e53dcfecb44f8e7ddc5bcbb00050705a423a298a57054ddce5daaee728ac03d1e25c71ad5070edf5907ac6eac0783 SHA512 4c74a657faa1cffedc083d061258508f483d25e5f3989d98e61608e245a6e75e5c389fefd0c31e5ccde6926c5173364852957b8d8b83a474842c635d1f7fc1c3
DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169 DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238 DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc

View File

@ -41,7 +41,7 @@ HOMEPAGE="https://www.gnu.org/software/libc/"
if [[ ${PV} == 9999* ]]; then if [[ ${PV} == 9999* ]]; then
inherit git-r3 inherit git-r3
else else
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi fi
@ -1705,7 +1705,7 @@ pkg_postinst() {
# must refresh it. See bug #933282 and GCC's documentation: # must refresh it. See bug #933282 and GCC's documentation:
# https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html
# #
# TODO: Could this be done for non-cross? Some care would be needed # TODO: Could this be done for cross? Some care would be needed
# to pass the right arguments. # to pass the right arguments.
while IFS= read -r -d $'\0' slot ; do while IFS= read -r -d $'\0' slot ; do
local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@ -12,7 +12,7 @@ TMPFILES_OPTIONAL=1
EMULTILIB_PKG="true" EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds) # Gentoo patchset (ignored for live ebuilds)
PATCH_VER=5 PATCH_VER=9
PATCH_DEV=dilfridge PATCH_DEV=dilfridge
# gcc mulitilib bootstrap files version # gcc mulitilib bootstrap files version
@ -41,7 +41,7 @@ HOMEPAGE="https://www.gnu.org/software/libc/"
if [[ ${PV} == 9999* ]]; then if [[ ${PV} == 9999* ]]; then
inherit git-r3 inherit git-r3
else else
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi fi
@ -248,29 +248,9 @@ build_eprefix() {
is_crosscompile && echo "${EPREFIX}" is_crosscompile && echo "${EPREFIX}"
} }
# We need to be able to set alternative headers for compiling for non-native
# platform. Will also become useful for testing kernel-headers without screwing
# up the whole system.
alt_headers() { alt_headers() {
echo ${ALT_HEADERS:=$(alt_prefix)/usr/include} echo $(alt_prefix)/usr/include
} }
alt_build_headers() {
if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
if tc-is-cross-compiler ; then
ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
local header_path=$(echo '#include <linux/version.h>' \
| $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 \
| grep -o '[^"]*linux/version.h')
ALT_BUILD_HEADERS=${header_path%/linux/version.h}
fi
fi
fi
echo "${ALT_BUILD_HEADERS}"
}
alt_libdir() { alt_libdir() {
echo $(alt_prefix)/$(get_libdir) echo $(alt_prefix)/$(get_libdir)
} }
@ -629,13 +609,13 @@ setup_env() {
# Last, we need the settings of the *build* environment, not of the # Last, we need the settings of the *build* environment, not of the
# target environment... # target environment...
local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) local current_binutils_path=$(env CHOST="${CBUILD}" ROOT="${BROOT}" binutils-config -B "${CTARGET}")
local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B)
einfo "Overriding clang configuration, since it won't work here" einfo "Overriding clang configuration, since it won't work here"
export CC="${current_gcc_path}/gcc" export CC="${current_gcc_path}/${CTARGET}-gcc"
export CPP="${current_gcc_path}/cpp" export CPP="${current_gcc_path}/${CTARGET}-cpp"
export CXX="${current_gcc_path}/g++" export CXX="${current_gcc_path}/${CTARGET}-g++"
export LD="${current_binutils_path}/ld.bfd" export LD="${current_binutils_path}/ld.bfd"
export AR="${current_binutils_path}/ar" export AR="${current_binutils_path}/ar"
export AS="${current_binutils_path}/as" export AS="${current_binutils_path}/as"
@ -792,7 +772,7 @@ eend_KV() {
get_kheader_version() { get_kheader_version() {
printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \ printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
$(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ $(tc-getCPP ${CTARGET}) -I "${ESYSROOT}$(alt_headers)" - | \
tail -n 1 tail -n 1
} }
@ -1065,7 +1045,7 @@ glibc_do_configure() {
--host=${CTARGET_OPT:-${CTARGET}} --host=${CTARGET_OPT:-${CTARGET}}
$(use_enable profile) $(use_enable profile)
$(use_with gd) $(use_with gd)
--with-headers=$(build_eprefix)$(alt_build_headers) --with-headers="${ESYSROOT}$(alt_headers)"
--prefix="$(host_eprefix)/usr" --prefix="$(host_eprefix)/usr"
--sysconfdir="$(host_eprefix)/etc" --sysconfdir="$(host_eprefix)/etc"
--localstatedir="$(host_eprefix)/var" --localstatedir="$(host_eprefix)/var"
@ -1228,7 +1208,7 @@ glibc_headers_configure() {
--enable-bind-now --enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}} --build=${CBUILD_OPT:-${CBUILD}}
--host=${CTARGET_OPT:-${CTARGET}} --host=${CTARGET_OPT:-${CTARGET}}
--with-headers=$(build_eprefix)$(alt_build_headers) --with-headers="${ESYSROOT}$(alt_headers)"
--prefix="$(host_eprefix)/usr" --prefix="$(host_eprefix)/usr"
${EXTRA_ECONF} ${EXTRA_ECONF}
) )
@ -1720,6 +1700,29 @@ pkg_postinst() {
use loong && glibc_refresh_ldconfig use loong && glibc_refresh_ldconfig
use compile-locales || run_locale_gen "${EROOT}/" use compile-locales || run_locale_gen "${EROOT}/"
# If fixincludes was/is active for a particular GCC slot, we
# must refresh it. See bug #933282 and GCC's documentation:
# https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html
#
# TODO: Could this be done for cross? Some care would be needed
# to pass the right arguments.
while IFS= read -r -d $'\0' slot ; do
local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders
local pthread_h="${BROOT}"/usr/lib/gcc/${CBUILD}/${slot##*/}/include-fixed/pthread.h
if [[ -x ${mkheaders_path} ]] ; then
ebegin "Refreshing fixincludes for ${CBUILD} with gcc-${slot##*/}"
${mkheaders_path} -v
eend $?
elif [[ -f ${pthread_h} ]] ; then
# fixincludes might have been enabled in the past for this
# GCC slot but not since we fixed toolchain.eclass to install
# mkheaders, so we need to manually delete pthread.h at least.
ebegin "Deleting stale fixincludes'd pthread.h for ${CBUILD} with gcc-${slot##*/}"
mv -v "${pthread_h}" "${pthread_h}.bak"
eend $?
fi
done < <(find "${BROOT}"/usr/libexec/gcc/${CBUILD}/ -mindepth 1 -maxdepth 1 -type d -print0)
fi fi
upgrade_warning upgrade_warning

File diff suppressed because it is too large Load Diff

View File

@ -1710,7 +1710,7 @@ pkg_postinst() {
# must refresh it. See bug #933282 and GCC's documentation: # must refresh it. See bug #933282 and GCC's documentation:
# https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html
# #
# TODO: Could this be done for non-cross? Some care would be needed # TODO: Could this be done for cross? Some care would be needed
# to pass the right arguments. # to pass the right arguments.
while IFS= read -r -d $'\0' slot ; do while IFS= read -r -d $'\0' slot ; do
local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders

View File

@ -1710,7 +1710,7 @@ pkg_postinst() {
# must refresh it. See bug #933282 and GCC's documentation: # must refresh it. See bug #933282 and GCC's documentation:
# https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Headers.html
# #
# TODO: Could this be done for non-cross? Some care would be needed # TODO: Could this be done for cross? Some care would be needed
# to pass the right arguments. # to pass the right arguments.
while IFS= read -r -d $'\0' slot ; do while IFS= read -r -d $'\0' slot ; do
local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders local mkheaders_path="${BROOT}"/usr/libexec/gcc/${CBUILD}/${slot##*/}/install-tools/mkheaders