sys-libs/glibc: update to 2.35

This commit is contained in:
lujianhua 2022-02-09 14:51:14 +08:00 committed by 梁永祥
parent b9fa2b72f9
commit f05996b600
4 changed files with 37 additions and 76 deletions

View File

@ -1,3 +1,5 @@
DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347
DIST glibc-2.35-patches-1.tar.xz 19808 BLAKE2B 4128f2c58a4a0550bdfcafb955b480aa8cbcf605930e1ef537ddcda3c1dc052e7a2760d5844bb00a318576cb0d2ea374c6a9da90c902d93852357f23d440379b SHA512 5107dd0c0cea6ef645c20a9feff8be30787304afda092074985756d5033e66534adf1336f89d8a6f4390ede3fcdd8b1270ef0c6783811a9be43e0ff50d639a76
DIST glibc-2.35.tar.xz 18165952 BLAKE2B 623c728884f070cd87ffeb9203f74206197c52405ac9bc44f3dd519a3468b8e8ae2536c883e5d17d94417dbd1e91775de2e674314e4ff7424f9720026d6b7063 SHA512 e7336ce27561be5d7c217832a1136fb327e057bd8d3f92925b35c97e3e9f9e486948b5a1e03e5e4090772ef06437a074d10b82e68f17f1ad8f22077ee39e1b66
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
DIST locale-gen-2.22.tar.gz 7971 BLAKE2B 2dc66fa69bf51799d0c34459b654fba6998b80a7e322e9b670036c967e269ad921f50195e6e34c4a83c1f0bad191fd5aa3f37defb82271b73acbca07b7e49d08 SHA512 9798b10dbbc792345a7b7a121dec5f4bba9839a8aec010f01a09f3402fd5bf2376f79e03a6a19bc357010db780037a8811c381136ce19be1f1370374906dff38

View File

@ -1,25 +1,25 @@
From 93ba92a0782bf7d3314f2a3ed92863ff8fc0ca62 Mon Sep 17 00:00:00 2001
From: Fangrui Song <maskray@google.com>
Date: Sun, 26 Sep 2021 00:10:51 -0700
Subject: [PATCH 06/19] x86: fix __arch_exchange_and_add_body
From 60fe344e4c9cacf9c953725309faa7e7ef63a2fc Mon Sep 17 00:00:00 2001
From: lujianhua <lujianhua000@gmail.com>
Date: Wed, 9 Feb 2022 14:20:22 +0800
Subject: [PATCH] x86: fix __arch_exchange_and_add_body
---
sysdeps/x86/atomic-machine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
index 2692d94a92..1cc010e74b 100644
index f24f1c7..89eb5b5 100644
--- a/sysdeps/x86/atomic-machine.h
+++ b/sysdeps/x86/atomic-machine.h
@@ -222,7 +222,7 @@ typedef uintmax_t uatomic_max_t;
@@ -196,7 +196,7 @@
else if (__HAVE_64B_ATOMICS) \
__asm __volatile (lock "xaddq %q0, %1" \
: "=r" (__result), "=m" (*mem) \
- : "0" ((atomic64_t) cast_to_integer (__addval)), \
- : "0" ((int64_t) cast_to_integer (__addval)), \
+ : "0" (cast_to_integer (__addval)), \
"m" (*mem), \
"i" (offsetof (tcbhead_t, multiple_threads))); \
else \
--
2.32.0
2.34.1

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -23,7 +23,7 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
PATCH_VER=2
PATCH_VER=1
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
@ -47,7 +47,7 @@ SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${L
SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemd systemtap test vanilla"
IUSE="audit caps cet +clone3 compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs suid systemd systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@ -148,7 +148,7 @@ RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.27
>=${CATEGORY}/gcc-6
>=${CATEGORY}/gcc-6.2
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
@ -185,6 +185,12 @@ XFAIL_TEST_LIST=(
# https://sourceware.org/PR19329
# https://bugs.gentoo.org/719674#c12
tst-stack4
# The following tests fail only inside portage
# https://bugs.gentoo.org/831267
tst-system
tst-strerror
tst-strsignal
)
#
@ -257,8 +263,8 @@ do_compile_test() {
rm -f glibc-test*
printf '%b' "$*" > glibc-test.c
# Most of the time CC is already set, but not in early sanity checks.
nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
# We assume CC is already set up.
nonfatal emake glibc-test
ret=$?
popd >/dev/null
@ -418,6 +424,9 @@ setup_flags() {
# #492892
filter-flags -frecord-gcc-switches
# #829583
filter-lfs-flags
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)
@ -437,33 +446,6 @@ setup_flags() {
filter-flags '-fstack-protector*'
}
want_tls() {
# Archs that can use TLS (Thread Local Storage)
case $(tc-arch) in
x86)
# requires i486 or better #106556
[[ ${CTARGET} == i[4567]86* ]] && return 0
return 1
;;
esac
return 0
}
want__thread() {
want_tls || return 1
# For some reason --with-tls --with__thread is causing segfaults on sparc32.
[[ ${PROFILE_ARCH} == "sparc" ]] && return 1
[[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
# only test gcc -- can't test linking yet
tc-has-tls -c ${CTARGET}
WANT__THREAD=$?
return ${WANT__THREAD}
}
use_multiarch() {
# Allow user to disable runtime arch detection in multilib.
use multiarch || return 1
@ -764,7 +746,7 @@ sanity_prechecks() {
ebegin "Checking that IA32 emulation is enabled in the running kernel"
echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
local STAT
if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
if ${CC-${CHOST}-gcc} ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
"${T}/check-ia32-emulation.elf32"
STAT=$?
else
@ -782,14 +764,6 @@ sanity_prechecks() {
# When we actually have to compile something...
if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
ebegin "Checking gcc for __thread support"
if ! eend $(want__thread ; echo $?) ; then
echo
eerror "Could not find a gcc that supports the __thread directive!"
eerror "Please update your binutils/gcc and try again."
die "No __thread support in gcc!"
fi
if [[ ${CTARGET} == *-linux* ]] ; then
local run_kv build_kv want_kv
@ -838,9 +812,6 @@ upgrade_warning() {
# pkg_pretend
pkg_pretend() {
# All the checks...
einfo "Checking general environment sanity."
sanity_prechecks
upgrade_warning
}
@ -852,13 +823,13 @@ pkg_setup() {
# src_unpack
src_unpack() {
# Consistency is not guaranteed between pkg_ and src_ ...
setup_env
einfo "Checking general environment sanity."
sanity_prechecks
use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
setup_env
if [[ ${PV} == 9999* ]] ; then
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
@ -934,21 +905,9 @@ glibc_do_configure() {
echo
local myconf=()
case ${CTARGET} in
m68k*)
# setjmp() is not compatible with stack protection:
# https://sourceware.org/PR24202
myconf+=( --enable-stack-protector=no )
;;
*)
# Use '=strong' instead of '=all' to protect only functions
# worth protecting from stack smashes.
# '=all' is also known to have a problem in IFUNC resolution
# tests: https://sourceware.org/PR25680, bug #712356.
myconf+=( --enable-stack-protector=$(usex ssp strong no) )
;;
esac
myconf+=( --enable-stackguard-randomization )
# Use '=strong' instead of '=all' to protect only functions
# worth protecting from stack smashes.
myconf+=( --enable-stack-protector=$(usex ssp strong no) )
# Keep a whitelist of targets supporing IFUNC. glibc's ./configure
# is not robust enough to detect proper support:
@ -998,7 +957,6 @@ glibc_do_configure() {
fi
myconf+=(
--without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@ -1017,7 +975,6 @@ glibc_do_configure() {
--with-pkgversion="$(glibc_banner)"
$(use_enable crypt)
$(use_multiarch || echo --disable-multi-arch)
$(use_enable static-pie)
$(use_enable systemtap)
$(use_enable nscd)
@ -1170,7 +1127,6 @@ glibc_headers_configure() {
myconf+=(
--disable-sanity-checks
--enable-hacker-mode
--without-cvs
--disable-werror
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
@ -1543,7 +1499,7 @@ glibc_sanity_check() {
# first let's find the actual dynamic linker here
# symlinks may point to the wrong abi
local newldso=$(find . -name 'ld*so.?' -type f -print -quit)
local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit)
einfo Last-minute run tests with ${newldso} in /$(get_libdir) ...

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>toolchain@gentoo.org</email>
<name>Gentoo Toolchain Project</name>
</maintainer>
<maintainer type="person">
<email>lujianhua000@gmail.com</email>
<name>lujianhua</name>
@ -15,7 +19,6 @@
<flag name="multilib-bootstrap">Provide prebuilt libgcc.a and crt files if missing. Only needed for ABI switch.</flag>
<flag name="nscd">Build, and enable support for, the Name Service Cache Daemon</flag>
<flag name="ssp">protect stack of glibc internals</flag>
<flag name="static-pie">Enable static PIE support (runtime files for -static-pie gcc option).</flag>
<flag name="suid">Make internal pt_chown helper setuid -- not needed if using Linux and have /dev/pts mounted with gid=5</flag>
<flag name="systemtap">enable systemtap static probe points</flag>
</use>