sys-libs/glibc: Sync with Gentoo

It's from Gentoo commit 64b575b776dd792705af38308ea83340e5f1ef44.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-01-12 07:17:36 +00:00 committed by Krzesimir Nowak
parent 2a5991e9eb
commit 15c8a066f8
7 changed files with 3623 additions and 21 deletions

View File

@ -25,9 +25,11 @@ DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc
DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
DIST glibc-2.40-patches-11.tar.xz 227044 BLAKE2B 2a8c799a88596f3fc28bc45fc206f231f628ff83aae242d69e216b65983def35d3aaab282287f1d77cb9d37d10bb71c483815ea83dfb2e47670a4cfcfbd1d92f SHA512 e984e4842951c24cf079e9a6f88771ede0709949402dd9f734cbfdf21ff40ca3d7380c0b9cc0c0d89943b6481adf8c7db2ab4b0ffe57e2e1fa514d925f0db395
DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
DIST glibc-2.41-patches-10.tar.xz 159460 BLAKE2B 6b228e2cb049b5fe43e42a2f0f30277b3d895d7ccae339e3cc25346b15b55d6399274a2c7d357adf55d08d3f673491e3008fb9e6c4871f6cf6cde340bf70df11 SHA512 1504e30b31e3f1d2d474714132c01badcdbced667c779803f6ee706e050ad3352e3ae2cfb8741067237c420e8ae29b9efaed7e08f43ece6d988fe7325a7974a2
DIST glibc-2.41-patches-8.tar.xz 139400 BLAKE2B 2023d09d6842a18dd19611e504c643cf866ba28b1d836d5a21f1a34d78f6fe82d6f3d4b76bf9a34dc8b1f12aac632fb85b95c025afbcf164976f30dfd794fe6d SHA512 c41e0a4e6dda014c6540a8178c0bc951e807deacb0cb85d4741b575fd2e9803ab9960b9caa783cf38449cb1452c40a3a0f54844b6c1e8ee47f7340c5f97dd261
DIST glibc-2.41.tar.xz 19344868 BLAKE2B 4da62f489ba7a95bb069c2cfea8cf78e4d37e3a5f7e1736239670ba1dca12b69aa77bd00ced078c27d91b1e622c58cbd70258161a9d18c5b3bcc95863b8d744d SHA512 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
DIST glibc-2.42-patches-4.tar.xz 48152 BLAKE2B 82b036226ad1435c99bfb1b4fc87523b92153e26cb4fbc82eeea0a41793bab7fa3c15dd7a02286cfb53e397e76f6978fe5e85022db12724c3f7c65c25598c8a4 SHA512 c34fb13f455e5e040eb45eabbdb97a611fe80634cb32eb23cad08a5ecd349d41a5b99a5aa18850a017ecf1291f21f8295a17e4697b34b000c75693bc0f3c04d7
DIST glibc-2.42-patches-5.tar.xz 63016 BLAKE2B bc608bbd2b38d13bd02da86e8229834e2a70ac1b69b2ace2b2ea15d10e8bf1b4679fbd5ee8fff470ed9e0913ab913779df9567c94193f7e4722f60af07b1b629 SHA512 4e24c3361ddeea5cc615783832e7a9dc82342449dbeda38d84dd15034d56afb9838fdc1dcd9119b15d56343d954ae651c6064ec76741a3ca9a61b2ea1b40079f
DIST glibc-2.42.tar.xz 19930508 BLAKE2B 6ffabfe7942034a5a4fb5097679cb47bc3431eb2a3864af07cea0cb6aa5db63fbaf6f026b3c9299e00268058a6762eb21e92499f012d552ed87d65c7ffbd0bbe SHA512 73a617db8e0f0958c0575f7a1c5a35b72b7e070b6cbdd02a9bb134995ca7ca0909f1e50d7362c53d2572d72f1879bb201a61d5275bac16136895d9a34ef0c068
DIST glibc-2.42.tar.xz.sig 981 BLAKE2B 890e637c444982b2b07fac4607ce3e9f416c9c7688267ebd135e53878d93db95c609facfa1f347c59f23776cafb4b5df8ffb60235c89be451276202dd676dab2 SHA512 d868220778e98d24aead10a585e6a903892e4d043cd96a404634c8aa03d001d624a46a5c0fe13c86f83f66396a1f360a10990966fe377e98a722914b5087575d
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238

View File

@ -41,7 +41,7 @@ HOMEPAGE="https://www.gnu.org/software/libc/"
if [[ ${PV} == 9999* ]]; then
inherit git-r3
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 x86"
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
fi

File diff suppressed because it is too large Load Diff

View File

@ -295,7 +295,7 @@ do_run_test() {
if [[ ${MERGE_TYPE} == "binary" ]] ; then
# ignore build failures when installing a binary package #324685
do_compile_test "" "$@" 2>/dev/null || return 0
CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
else
ebegin "Performing simple compile test for ABI=${ABI}"
if ! do_compile_test "" "$@" ; then

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
# Copyright 1999-2025 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -54,7 +54,7 @@ SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
SLOT="2.2"
IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
IUSE="audit caps cet clang compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux sframe +ssp stack-realign +static-libs suid systemd systemtap test vanilla"
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@ -155,7 +155,10 @@ if [[ ${CATEGORY} == cross-* ]] ; then
else
BDEPEND+="
>=sys-devel/binutils-2.27
>=sys-devel/gcc-6.2
clang? ( || ( ( >=sys-devel/gcc-6.2 )
( >=sys-devel/gcc-6.2 >=llvm-core/clang-18 )
( >=llvm-core/clang-18 >=llvm-runtimes/libgcc-18 ) ) )
!clang? ( >=sys-devel/gcc-6.2 )
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
@ -295,7 +298,8 @@ do_run_test() {
if [[ ${MERGE_TYPE} == "binary" ]] ; then
# ignore build failures when installing a binary package #324685
do_compile_test "" "$@" 2>/dev/null || return 0
CC="${glibc__ORIG_CC}" CXX="${glibc__ORIG_CXX}" CPP="${glibc__ORIG_CPP}" \
CFLAGS="-O2" LDFLAGS="" do_compile_test "" "$@" 2>/dev/null || return 0
else
ebegin "Performing simple compile test for ABI=${ABI}"
if ! do_compile_test "" "$@" ; then
@ -468,6 +472,11 @@ setup_flags() {
append-ldflags '-Wl,--hash-style=both'
fi
# clang warns about linker flags unused during compilation, but we don't
# want that to turn into errors!
# Let's turn the warning off entirely since it spams.
append-flags -Wno-unused-command-line-argument
# #492892
filter-flags -frecord-gcc-switches
@ -599,7 +608,7 @@ setup_env() {
export glibc__ORIG_CXX=${CXX}
export glibc__ORIG_CPP=${CPP}
if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then
if tc-is-clang && ! ( use clang || use custom-cflags ) && ! is_crosscompile ; then
export glibc__force_gcc=yes
# once this is toggled on, it needs to stay on, since with CPP manipulated
# tc-is-clang does not work correctly anymore...
@ -610,9 +619,8 @@ setup_env() {
# recover the proper gcc and binutils settings here, at least until glibc
# is finally building with clang. So let's override everything that is
# set in the clang profiles.
# Want to shoot yourself into the foot? Set USE=custom-cflags, that's always
# a good start into that direction.
# Also, if you're crosscompiling, let's assume you know what you are doing.
# Want to shoot yourself into the foot? Set USE="clang" or USE="custom-cflags".
# Also, if you are crosscompiling, let's assume you know what you are doing.
# Hopefully.
# Last, we need the settings of the *build* environment, not of the
# target environment...
@ -641,26 +649,22 @@ setup_env() {
filter-flags '-D_FORTIFY_SOURCE=*'
else
# this is the "normal" case
export CC="$(tc-getCC ${CTARGET})"
export CXX="$(tc-getCXX ${CTARGET})"
export CPP="$(tc-getCPP ${CTARGET})"
# Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
# can't detect them automatically due to ${CHOST} mismatch and fallbacks
# to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
export CC="$(tc-getCC ${CTARGET})"
export CXX="$(tc-getCXX ${CTARGET})"
export CPP="$(tc-getCPP ${CTARGET})"
export NM="$(tc-getNM ${CTARGET})"
export READELF="$(tc-getREADELF ${CTARGET})"
fi
# We need to export CFLAGS with abi information in them because glibc's
# configure script checks CFLAGS for some targets (like mips). Keep
# around the original clean value to avoid appending multiple ABIs on
# top of each other. (Why does the comment talk about CFLAGS if the code
# acts on CC?)
# We need to move CFLAGS with abi information into CC etc per glibc upstream
# requirement. Keep around the original clean value to avoid appending
# multiple ABIs on top of each other.
export glibc__GLIBC_CC=${CC}
export glibc__GLIBC_CXX=${CXX}
export glibc__GLIBC_CPP=${CPP}
@ -802,7 +806,7 @@ sanity_prechecks() {
if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
eerror "Your old kernel is broken. You need to update it to a newer"
eerror "version as syscall(<bignum>) will break. See bug 279260."
die "Old and broken kernel."
[[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Old and broken kernel."
fi
fi

View File

@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="cet">Enable Intel Control-flow Enforcement Technology (needs binutils 2.29 and gcc 8)</flag>
<flag name="clang">Allow building with clang (if proper environment is set). Highly experimental. Disable to auto-force gcc usage.</flag>
<flag name="clone3">Enable the new clone3 syscall within glibc. Can be disabled to allow compatibility with older Electron applications.</flag>
<flag name="compile-locales">build *all* locales in src_install; this is generally meant for stage building only as it ignores /etc/locale.gen file and can be pretty slow</flag>
<flag name="crypt">build and install libcrypt and crypt.h</flag>