summaryrefslogtreecommitdiff
path: root/sys-libs/glibc/glibc-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /sys-libs/glibc/glibc-9999.ebuild
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild127
1 files changed, 39 insertions, 88 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index fb9790efbb56..ca7219535589 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -29,12 +29,12 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset
-PATCH_VER=15
+PATCH_VER=16
SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? ( 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 suid systemtap test vanilla"
+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"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@@ -89,7 +89,6 @@ BDEPEND="
>=app-misc/pax-utils-0.1.10
sys-devel/bison
!<sys-devel/bison-2.7
- !<sys-devel/make-4
doc? ( sys-apps/texinfo )
"
COMMON_DEPEND="
@@ -103,7 +102,7 @@ COMMON_DEPEND="
systemtap? ( dev-util/systemtap )
"
DEPEND="${COMMON_DEPEND}
- test? ( >=net-dns/libidn2-2.0.5 )
+ test? ( >=net-dns/libidn2-2.3.0 )
"
RDEPEND="${COMMON_DEPEND}
sys-apps/gentoo-functions
@@ -124,12 +123,22 @@ else
"
DEPEND+=" virtual/os-headers "
RDEPEND+="
- >=net-dns/libidn2-2.0.5
+ >=net-dns/libidn2-2.3.0
vanilla? ( !sys-libs/timezone-data )
"
PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
fi
+# Ignore tests whitelisted below
+GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}"
+
+# The following tests fail due to the Gentoo build system and are thus
+# executed but ignored:
+XFAIL_TEST_LIST=(
+ # 9) Failures of unknown origin
+ tst-latepthread
+)
+
#
# Small helper functions
#
@@ -282,77 +291,27 @@ setup_target_flags() {
filter-flags "-fcall-used-g7"
append-flags "-fcall-used-g6"
- # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
- # try to pick a better one so glibc can use cpu-specific .S files.
- # We key off the CFLAGS to get a good value. Also need to handle
- # version skew.
- # We can't force users to set their CHOST to their exact machine
- # as many of these are not recognized by config.sub/gcc and such :(.
- # Note: If the mcpu values don't scale, we might try probing CPP defines.
- # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ?
-
local cpu
case ${CTARGET} in
sparc64-*)
+ cpu="sparc64"
case $(get-flag mcpu) in
- niagara[234])
- if ver_test -ge 2.8 ; then
- cpu="sparc64v2"
- elif ver_test -ge 2.4 ; then
- cpu="sparc64v"
- elif ver_test -ge 2.2.3 ; then
- cpu="sparc64b"
- fi
- ;;
- niagara)
- if ver_test -ge 2.4 ; then
- cpu="sparc64v"
- elif ver_test -ge 2.2.3 ; then
- cpu="sparc64b"
- fi
- ;;
- ultrasparc3)
- cpu="sparc64b"
- ;;
- *)
+ v9)
# We need to force at least v9a because the base build doesn't
# work with just v9.
# https://sourceware.org/bugzilla/show_bug.cgi?id=19477
- [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
+ append-flags "-Wa,-xarch=v9a"
;;
esac
;;
sparc-*)
case $(get-flag mcpu) in
- niagara[234])
- if ver_test -ge 2.8 ; then
- cpu="sparcv9v2"
- elif ver_test -ge 2.4 ; then
- cpu="sparcv9v"
- elif ver_test -ge 2.2.3 ; then
- cpu="sparcv9b"
- else
- cpu="sparcv9"
- fi
- ;;
- niagara)
- if ver_test -ge 2.4 ; then
- cpu="sparcv9v"
- elif ver_test -ge 2.2.3 ; then
- cpu="sparcv9b"
- else
- cpu="sparcv9"
- fi
- ;;
- ultrasparc3)
- cpu="sparcv9b"
- ;;
- v9|ultrasparc)
- cpu="sparcv9"
- ;;
v8|supersparc|hypersparc|leon|leon3)
cpu="sparcv8"
;;
+ *)
+ cpu="sparcv9"
+ ;;
esac
;;
esac
@@ -503,7 +462,7 @@ setup_env() {
# 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.
- : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
+ : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})}
export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
einfo " $(printf '%15s' 'Manual CC:') ${CC}"
}
@@ -534,27 +493,6 @@ glibc_banner() {
echo "${b}"
}
-check_devpts() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown.
-
- # If merely building the binary package, then there's nothing to verify.
- [[ ${MERGE_TYPE} == "buildonly" ]] && return
-
- # Only sanity check when installing the native glibc.
- [[ -n ${ROOT} ]] && return
-
- # If they're opting in to the old suid code, then no need to check.
- use suid && return
-
- if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then
- eerror "In order to use glibc with USE=-suid, you must make sure that"
- eerror "you have devpts mounted at /dev/pts with the gid=5 option."
- eerror "Openrc should do this for you, so you should check /etc/fstab"
- eerror "and make sure you do not have any invalid settings there."
- die "mount & fix your /dev/pts settings"
- fi
-}
-
# The following Kernel version handling functions are mostly copied from portage
# source. It's better not to use linux-info.eclass here since a) it adds too
# much magic, see bug 326693 for some of the arguments, and b) some of the
@@ -624,9 +562,6 @@ get_kheader_version() {
# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
# src_unpack.
sanity_prechecks() {
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown
- check_devpts
-
# Prevent native builds from downgrading
if [[ ${MERGE_TYPE} != "buildonly" ]] && \
[[ -z ${ROOT} ]] && \
@@ -869,7 +804,11 @@ glibc_do_configure() {
myconf+=( --enable-stack-protector=no )
;;
*)
- myconf+=( --enable-stack-protector=$(usex ssp all 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 )
@@ -941,6 +880,7 @@ 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)
${EXTRA_ECONF}
@@ -1135,7 +1075,18 @@ src_compile() {
glibc_src_test() {
cd "$(builddir nptl)"
- emake check
+
+ local myxfailparams=""
+ if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ for myt in ${XFAIL_TEST_LIST[@]} ; do
+ myxfailparams+="test-xfail-${myt}=yes "
+ done
+ fi
+
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
}
do_src_test() {