summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/Manifest7
-rw-r--r--sys-libs/glibc/glibc-2.33-r10.ebuild (renamed from sys-libs/glibc/glibc-2.32-r10.ebuild)103
2 files changed, 58 insertions, 52 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index d79185b0..9d2d29dc 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -1,5 +1,4 @@
-DIST backport-rv32.txz 26416 BLAKE2B 7a6b593859f88a3c040f06324dace4cc6137d14d4580fad9ea285829666d761c3dd01c190746e86846c219423124c77a55bc57b6e56efe6401a9c99d7fa445cd SHA512 d08dc02c4f0a3c5a15c57fbb5190588121c0e0728e6ab2119483407a98625efe58b3c83b44d750b0146171e63dcf8a6dbb6d1a057d042f794eed9adbd1f0293e
-DIST gcc-multilib-bootstrap-20180511.tar.xz 2392908 BLAKE2B f3cf614399368acd8908f60d894c6344a2fa09383b30c1633a0682bc668367c8a2f8c6fec2d41b6e2178d709a2bd8db57e8b2ab56ba263c7d56f819c15acd061 SHA512 98c766e913693ab42ff790557acde2a36a8001e2648046a685b21964200df8d4d52d8452d499c0068c6648284d086ce062c2d36e2c6c2fd8aacd232d193f2853
-DIST glibc-2.32-patches-2.tar.xz 8588 BLAKE2B 57a85241e3270d14df0332b039a933c5a7ee4d089684d85cca564eeec2d6796735de60b628c5746858757342922d58993d6cf7187ce1d7102b2299ca2cf8513f SHA512 45bbab9e2f813f55cb4a1438dcd9365170b8facff50b11648ba6022da06c20029bb65a4b06fd906af82aa7461b7374f85105fd7eedb7915cec3f1df3779b68a3
-DIST glibc-2.32.tar.xz 16744512 BLAKE2B a56b4afbb35315c5cd6dca0f62e44455dceae3e6e88a8453621f9a5394a60ddf10ca9309b2db0911830c7fd77e3faa5d94694eb94d5b2c05fc5285cef52255da SHA512 8460c155b7003e04f18dabece4ed9ad77445fa2288a7dc08e80a8fc4c418828af29e0649951bd71a54ea2ad2d4da7570aafd9bdfe4a37e9951b772b442afe50b
+DIST gcc-multilib-bootstrap-20201208.tar.xz 5528452 BLAKE2B 16699a6e4df5b2f28a21776ae9e3728b26a9ea251f5580aa5349545ad7c9f6145b9cb6a12ca8f5f96b9cb2a3c70b7e66ca702e4c6f083ac00408e0a20a69e613 SHA512 a243f505e17d0a7e144e8713c077582412f61d6cf7f79baa846de4fb77f5e0f27e11c9a785e14624e04ac52287b32164e7995323aa11caef59113ac438254347
+DIST glibc-2.33-patches-4.tar.xz 60124 BLAKE2B a7a99f39c16df241745772c31b10946dc44c51e6c09f8a447b905e7dd6ba529aee08f66a581431453c6665485ac1848861559aa3f0aaba8c2061c1f1eb77d9be SHA512 05c33dc465a98097f836783bb5037dfa14b3a2c0c140014f642ea72954222ae919fe2db9573ee70ca9c1881b3b59dd4b815a8f39f331494fa12951c9012797ef
+DIST glibc-2.33.tar.xz 17031280 BLAKE2B 703d12121c1e2c5d9e0c6ba5341f5fb5c4d9111611a83f2360029b5de9c6e5a5611249d1833684a58ed4afdf49cae614365d87ec8721ba0e5d218f593b1f229d SHA512 4cb5777b68b22b746cc51669e0e9282b43c83f6944e42656e6db7195ebb68f2f9260f130fdeb4e3cfc64efae4f58d96c43d388f52be1eb024ca448084684abdb
DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db
diff --git a/sys-libs/glibc/glibc-2.32-r10.ebuild b/sys-libs/glibc/glibc-2.33-r10.ebuild
index bbb7b0df..40963b19 100644
--- a/sys-libs/glibc/glibc-2.32-r10.ebuild
+++ b/sys-libs/glibc/glibc-2.33-r10.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{6,7,8,9} )
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+TMPFILES_OPTIONAL=1
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig \
- multilib systemd multiprocessing
+inherit python-any-r1 prefix toolchain-funcs flag-o-matic gnuconfig \
+ multilib systemd multiprocessing tmpfiles
DESCRIPTION="GNU libc C library"
HOMEPAGE="https://www.gnu.org/software/libc/"
@@ -16,28 +17,27 @@ SLOT="2.2"
EMULTILIB_PKG="true"
# Gentoo patchset (ignored for live ebuilds)
-PATCH_VER=2
+PATCH_VER=4
PATCH_DEV=dilfridge
if [[ ${PV} == 9999* ]]; then
inherit git-r3
else
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86"
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+=" riscv? ( https://dev.gentoo.org/~dilfridge/distfiles/backport-rv32.txz )"
fi
RELEASE_VER=${PV}
-GCC_BOOTSTRAP_VER=20180511
+GCC_BOOTSTRAP_VER=20201208
LOCALE_GEN_VER=2.10
SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
-SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
+IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only +multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs static-pie suid systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@@ -133,13 +133,13 @@ RESTRICT="!test? ( test )"
if [[ ${CATEGORY} == cross-* ]] ; then
BDEPEND+=" !headers-only? (
- >=${CATEGORY}/binutils-2.24
+ >=${CATEGORY}/binutils-2.27
>=${CATEGORY}/gcc-6
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
BDEPEND+="
- >=sys-devel/binutils-2.24
+ >=sys-devel/binutils-2.27
>=sys-devel/gcc-6
"
DEPEND+=" virtual/os-headers "
@@ -393,6 +393,10 @@ setup_flags() {
# glibc aborts if rpath is set by LDFLAGS
filter-ldflags '-Wl,-rpath=*'
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
# #492892
filter-flags -frecord-gcc-switches
@@ -645,21 +649,6 @@ sanity_prechecks() {
ewarn "hypervisor, which is probably not what you want."
fi
- # Check for sanity of /etc/nsswitch.conf
- if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then
- local entry
- for entry in passwd group shadow; do
- if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then
- eerror "Your ${EROOT}/etc/nsswitch.conf is out of date."
- eerror "Please make sure you have 'files' entries for"
- eerror "'passwd:', 'group:' and 'shadow:' databases."
- eerror "For more details see:"
- eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26"
- die "nsswitch.conf has no 'files' provider in '${entry}'."
- fi
- done
- fi
-
# ABI-specific checks follow here. Hey, we have a lot more specific conditions that
# we test for...
if ! is_crosscompile ; then
@@ -743,7 +732,7 @@ src_unpack() {
# Consistency is not guaranteed between pkg_ and src_ ...
sanity_prechecks
- use multilib && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
setup_env
@@ -765,7 +754,6 @@ src_unpack() {
cd "${WORKDIR}" || die
unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
- use riscv && unpack backport-rv32.txz
}
src_prepare() {
@@ -776,15 +764,9 @@ src_prepare() {
else
patchsetname="${RELEASE_VER}-${PATCH_VER}"
fi
- elog "Applying Gentoo Glibc Patchset ${patchsetname}"
+ einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
eapply "${WORKDIR}"/patches
einfo "Done."
-
- if use riscv ; then
- elog "Adding rv32 backport patchset for glibc-2.32 (experimental)"
- eapply "${WORKDIR}"/backport-rv32
- einfo "Done."
- fi
fi
default
@@ -870,14 +852,6 @@ glibc_do_configure() {
# https://sourceware.org/PR24202
myconf+=( --enable-stack-protector=no )
;;
- powerpc-*)
- # Currently gcc on powerpc32 generates invalid code for
- # __builtin_return_address(0) calls. Normally programs
- # don't do that but malloc hooks in glibc do:
- # https://gcc.gnu.org/PR81996
- # https://bugs.gentoo.org/629054
- myconf+=( --enable-stack-protector=no )
- ;;
*)
# Use '=strong' instead of '=all' to protect only functions
# worth protecting from stack smashes.
@@ -963,6 +937,15 @@ glibc_do_configure() {
# https://bugs.gentoo.org/753740
libc_cv_complocaledir='${exec_prefix}/lib/locale'
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
${EXTRA_ECONF}
)
@@ -1005,7 +988,7 @@ glibc_do_configure() {
# is built with MULTILIB_ABIS="amd64 x86" but we want to
# add x32 to it, gcc/glibc don't yet support x32.
#
- if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
+ if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
echo 'main(){}' > "${T}"/test.c
if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
@@ -1270,7 +1253,6 @@ glibc_do_src_install() {
n64 /lib64/ld.so.1
# powerpc
ppc /lib/ld.so.1
- ppc64 /lib64/ld64.so.1
# riscv
ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
ilp32 /lib/ld-linux-riscv32-ilp32.so.1
@@ -1288,12 +1270,16 @@ glibc_do_src_install() {
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
)
;;
big)
ldso_abi_list+=(
# arm
arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
)
;;
esac
@@ -1310,6 +1296,27 @@ glibc_do_src_install() {
fi
done
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
# With devpts under Linux mounted properly, we do not need the pt_chown
# binary to be setuid. This is because the default owners/perms will be
# exactly what we want.
@@ -1371,7 +1378,7 @@ glibc_do_src_install() {
sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
systemd_dounit nscd/nscd.service
- systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
fi
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
@@ -1417,7 +1424,7 @@ src_install() {
foreach_abi glibc_do_src_install
if ! use static-libs ; then
- elog "Not installing static glibc libraries"
+ einfo "Not installing static glibc libraries"
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
fi
}