From 3517852e3b8a68d1e997770fc0650c5053bafc6c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 4 Jan 2022 01:27:12 +0000 Subject: gentoo resync : 04.01.2022 --- eclass/toolchain.eclass | 48 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) (limited to 'eclass/toolchain.eclass') diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index fd03ba176276..61718f0d9a01 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -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 # @ECLASS: toolchain.eclass @@ -359,7 +359,6 @@ gentoo_urls() { # with a Cygwin target. get_gcc_src_uri() { export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}} - export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}} export MUSL_GCC_VER=${MUSL_GCC_VER:-${PATCH_GCC_VER}} export PIE_GCC_VER=${PIE_GCC_VER:-${GCC_RELEASE_VER}} export HTB_GCC_VER=${HTB_GCC_VER:-${GCC_RELEASE_VER}} @@ -373,7 +372,7 @@ get_gcc_src_uri() { # pull gcc tarball from another location. Frequently used by gnat-gpl. GCC_SRC_URI="${GCC_TARBALL_SRC_URI}" elif [[ -n ${SNAPSHOT} ]] ; then - GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz" + GCC_SRC_URI="https://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz" else if tc_version_is_between 5.5 6 || tc_version_is_between 6.4 7 || tc_version_is_at_least 7.2 ; then GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.xz" @@ -382,8 +381,6 @@ get_gcc_src_uri() { fi fi - [[ -n ${UCLIBC_VER} ]] && \ - GCC_SRC_URI+=" $(gentoo_urls gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2)" [[ -n ${PATCH_VER} ]] && \ GCC_SRC_URI+=" $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)" [[ -n ${MUSL_VER} ]] && \ @@ -557,10 +554,6 @@ do_gcc_gentoo_patches() { BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}" fi - if [[ -n ${UCLIBC_VER} ]] ; then - tc_apply_patches "Applying uClibc patches ..." "${WORKDIR}"/uclibc/*.patch - fi - if [[ -n ${MUSL_VER} ]] && [[ ${CTARGET} == *musl* ]] ; then if [[ ${CATEGORY} == cross-* ]] ; then # We don't want to apply some patches when cross-compiling. @@ -923,21 +916,9 @@ toolchain_src_configure() { # Undoing it here. confgcc+=( --disable-libstdcxx-time ) ;; - *-freebsd*) needed_libc=freebsd-lib;; *-gnu*) needed_libc=glibc;; *-klibc) needed_libc=klibc;; *-musl*) needed_libc=musl;; - *-uclibc*) - # Enable shared library support only on targets - # that support it: bug #291870 - if ! echo '#include ' | \ - $(tc-getCPP ${CTARGET}) -E -dD - 2>/dev/null | \ - grep -q __HAVE_SHARED__ - then - confgcc+=( --disable-shared ) - fi - needed_libc=uclibc-ng - ;; *-cygwin) needed_libc=cygwin;; x86_64-*-mingw*|\ *-w64-mingw*) needed_libc=mingw64-runtime;; @@ -991,14 +972,6 @@ toolchain_src_configure() { # __cxa_atexit is "essential for fully standards-compliant handling of # destructors", but apparently requires glibc. case ${CTARGET} in - *-uclibc*) - if tc_has_feature nptl ; then - confgcc+=( - --disable-__cxa_atexit - $(use_enable nptl tls) - ) - fi - ;; *-elf|*-eabi) confgcc+=( --with-newlib ) ;; @@ -1011,9 +984,6 @@ toolchain_src_configure() { --enable-clocale=gnu ) ;; - *-freebsd*) - confgcc+=( --enable-__cxa_atexit ) - ;; *-solaris*) confgcc+=( --enable-__cxa_atexit ) ;; @@ -2301,8 +2271,6 @@ hardened_gcc_works() { # $gcc_cv_ld_pie is unreliable as it simply take the output of # `ld --help | grep -- -pie`, that reports the option in all cases, also if # the loader doesn't actually load the resulting executables. - # To avoid breakage, blacklist FreeBSD here at least - [[ ${CTARGET} == *-freebsd* ]] && return 1 want_pie || return 1 _tc_use_if_iuse nopie && return 1 @@ -2324,17 +2292,9 @@ hardened_gcc_works() { hardened_gcc_is_stable() { local tocheck if [[ $1 == "pie" ]] ; then - if [[ ${CTARGET} == *-uclibc* ]] ; then - tocheck=${PIE_UCLIBC_STABLE} - else - tocheck=${PIE_GLIBC_STABLE} - fi + tocheck=${PIE_GLIBC_STABLE} elif [[ $1 == "ssp" ]] ; then - if [[ ${CTARGET} == *-uclibc* ]] ; then - tocheck=${SSP_UCLIBC_STABLE} - elif [[ ${CTARGET} == *-gnu* ]] ; then - tocheck=${SSP_STABLE} - fi + tocheck=${SSP_STABLE} else die "hardened_gcc_stable needs to be called with pie or ssp" fi -- cgit v1.2.3