summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-07-17 19:04:28 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-07-17 19:04:28 +0100
commit514d1bbe260df2521fe60f1a3ec87cfcfde1a829 (patch)
tree555c194dbeb0fb2ac4ad3cde7c0f6a80fd330ce2 /eclass
parent4df3bf9762850b34cd1ead5c80374d1a0fc3362e (diff)
gentoo resync : 17.07.2021
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36339 -> 36175 bytes
-rw-r--r--eclass/bash-completion-r1.eclass15
-rw-r--r--eclass/cannadic.eclass153
-rw-r--r--eclass/cuda.eclass8
-rw-r--r--eclass/fortran-2.eclass4
-rw-r--r--eclass/ghc-package.eclass2
-rw-r--r--eclass/haskell-cabal.eclass2
-rw-r--r--eclass/l10n.eclass2
-rw-r--r--eclass/pax-utils.eclass4
-rw-r--r--eclass/toolchain.eclass330
10 files changed, 149 insertions, 371 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 27f4f22088b7..4da1fdc826bb 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/bash-completion-r1.eclass b/eclass/bash-completion-r1.eclass
index 80f2d5fcd32a..f0451b773a93 100644
--- a/eclass/bash-completion-r1.eclass
+++ b/eclass/bash-completion-r1.eclass
@@ -4,12 +4,12 @@
# @ECLASS: bash-completion-r1.eclass
# @MAINTAINER:
# mgorny@gentoo.org
-# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: A few quick functions to install bash-completion files
# @EXAMPLE:
#
# @CODE
-# EAPI=5
+# EAPI=8
#
# src_configure() {
# econf \
@@ -23,11 +23,14 @@
# }
# @CODE
+if [[ ! ${_BASH_COMPLETION_R1_ECLASS} ]]; then
+_BASH_COMPLETION_R1_ECLASS=1
+
inherit toolchain-funcs
-case ${EAPI:-0} in
- 0|1|2|3|4|5|6|7) ;;
- *) die "EAPI ${EAPI} unsupported (yet)."
+case ${EAPI} in
+ 5|6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
# @FUNCTION: _bash-completion-r1_get_bashdir
@@ -136,3 +139,5 @@ bashcomp_alias() {
|| return
done
}
+
+fi
diff --git a/eclass/cannadic.eclass b/eclass/cannadic.eclass
deleted file mode 100644
index ac56ef2849ca..000000000000
--- a/eclass/cannadic.eclass
+++ /dev/null
@@ -1,153 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# @DEAD
-# No consumers left. Removal in 30 days.
-
-# @ECLASS: cannadic.eclass
-# @MAINTAINER:
-# cjk@gentoo.org
-# @AUTHOR:
-# Mamoru KOMACHI <usata@gentoo.org>
-# @SUPPORTED_EAPIS: 7
-# @BLURB: Function for Canna compatible dictionaries
-# @DESCRIPTION:
-# The cannadic eclass is used for installation and setup of Canna
-# compatible dictionaries.
-
-case ${EAPI} in
- 7) ;;
- *) die "EAPI=${EAPI:-0} is not supported" ;;
-esac
-
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-
-if [[ -z ${_CANNADIC_ECLASS} ]]; then
-_CANNADIC_ECLASS=1
-
-SRC_URI="mirror://gentoo/${P}.tar.gz"
-
-# You don't need to modify these
-readonly _CANNADIC_CANNA_DIR="/var/lib/canna/dic/canna"
-readonly _CANNADIC_DICS_DIR="/var/lib/canna/dic/dics.d"
-
-# @FUNCTION: cannadic-install
-# @DESCRIPTION:
-# Installs dictionaries to ${EPREFIX}/var/lib/canna/dic/canna
-cannadic-install() {
- insinto ${_CANNADIC_CANNA_DIR}
- insopts -m 0664 -o bin -g bin
- doins "${@}"
-}
-
-# @FUNCTION: dicsdir-install
-# @DESCRIPTION:
-# Installs dics.dir from ${DICSDIRFILE}
-dicsdir-install() {
- insinto ${_CANNADIC_DICS_DIR}
- doins ${DICSDIRFILE}
-}
-
-# @FUNCTION: cannadic_src_install
-# @DESCRIPTION:
-# Installs all dictionaries under ${WORKDIR}
-# plus dics.dir and docs
-cannadic_src_install() {
- keepdir ${_CANNADIC_CANNA_DIR}
- fowners bin:bin ${_CANNADIC_CANNA_DIR}
- fperms 0775 ${_CANNADIC_CANNA_DIR}
-
- local f
- for f in *.c[btl]d *.t; do
- if [[ -s ${f} ]]; then
- cannadic-install "${f}"
- fi
- done 2> /dev/null
-
- dicsdir-install
-
- einstalldocs
-}
-
-# @FUNCTION: update-cannadic-dir
-# @DESCRIPTION:
-# Updates dics.dir for Canna Server, script for this part taken from Debian GNU/Linux
-#
-# compiles dics.dir files for Canna Server
-# Copyright 2001 ISHIKAWA Mutsumi
-# Licensed under the GNU General Public License, version 2. See the file
-# /usr/portage/license/GPL-2 or <http://www.gnu.org/copyleft/gpl.txt>.
-update-cannadic-dir() {
- einfo
- einfo "Updating dics.dir for Canna ..."
- einfo
-
- # write new dics.dir file in case we are interrupted
- cat <<-EOF > "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
- # dics.dir -- automatically generated file by Portage.
- # DO NOT EDIT BY HAND.
- EOF
-
- local f
- for f in "${EROOT}${_CANNADIC_DICS_DIR}"/*.dics.dir; do
- echo "# ${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
- cat "${f}" >> "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new || die
- einfo "Added ${f}."
- done
-
- mv "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir.update-new \
- "${EROOT}${_CANNADIC_CANNA_DIR}"/dics.dir || die
-
- einfo
- einfo "Done."
- einfo
-}
-
-# @FUNCTION: cannadic_pkg_postinst
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after install
-cannadic_pkg_postinst() {
- debug-print-function ${FUNCNAME} "${@}"
-
- update-cannadic-dir
-
- einfo "Please restart cannaserver for changes to propagate."
- einfo "You need to modify your config file (~/.canna) to enable dictionaries."
-
- if [[ -n ${CANNADICS} ]]; then
- einfo "e.g) add"
- einfo
- einfo " $(IFS=' ' ; echo ${CANNADICS[*]})"
- einfo
- einfo "to section use-dictionary()."
- einfo "For details, see documents under ${EROOT}/usr/share/doc/${PF}."
- fi
-
- einfo "If you do not have ~/.canna, you can find sample files in ${EROOT}/usr/share/canna."
- ewarn "If you are upgrading from existing dictionary, you may need to recreate"
- ewarn "user dictionary if you have one."
-}
-
-# @FUNCTION: cannadic_pkg_postrm
-# @DESCRIPTION:
-# Updates dics.dir and print out notice after uninstall
-cannadic_pkg_postrm() {
- debug-print-function ${FUNCNAME} "${@}"
-
- update-cannadic-dir
-
- einfo "Please restart cannaserver for changes to propagate."
- einfo "and modify your config file (~/.canna) to disable dictionary."
-
- if [[ -n ${CANNADICS} ]]; then
- einfo "e.g) delete"
- einfo
- einfo " $(IFS=' ' ; echo ${CANNADICS[*]})"
- einfo
- einfo "from section use-dictionary()."
- fi
-
- einfo
-}
-
-fi
diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
index b1da77c69dda..08d2302d55b9 100644
--- a/eclass/cuda.eclass
+++ b/eclass/cuda.eclass
@@ -1,11 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
case "${EAPI:-0}" in
- 0|1|2|3|4)
+ [0-6])
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 5|6|7)
+ 7|8)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
@@ -15,7 +15,7 @@ esac
# @ECLASS: cuda.eclass
# @MAINTAINER:
# Gentoo Science Project <sci@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: Common functions for cuda packages
# @DESCRIPTION:
# This eclass contains functions to be used with cuda package. Currently it is
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 0bb00f475a21..9d0c71703e49 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author Justin Lecher <jlec@gentoo.org>
# Test functions provided by Sebastien Fabbro and Kacper Kowalik
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: Simplify fortran compiler management
# @DESCRIPTION:
# If you need a fortran compiler, then you should be inheriting this eclass.
@@ -31,7 +31,7 @@ inherit toolchain-funcs
case ${EAPI:-0} in
# not used in the eclass, but left for backward compatibility with legacy users
5|6) inherit eutils ;;
- 7) ;;
+ 7|8) ;;
*) die "EAPI=${EAPI} is not supported" ;;
esac
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass
index 1d90c7fc383e..303cf32d7ef5 100644
--- a/eclass/ghc-package.eclass
+++ b/eclass/ghc-package.eclass
@@ -4,9 +4,9 @@
# @ECLASS: ghc-package.eclass
# @MAINTAINER:
# "Gentoo's Haskell Language team" <haskell@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
# @AUTHOR:
# Original Author: Andres Loeh <kosmikus@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: This eclass helps with the Glasgow Haskell Compiler's package configuration utility.
# @DESCRIPTION:
# Helper eclass to handle ghc installation/upgrade/deinstallation process.
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index 0e41325b3061..9587c33a12b6 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -4,10 +4,10 @@
# @ECLASS: haskell-cabal.eclass
# @MAINTAINER:
# Haskell herd <haskell@gentoo.org>
-# @SUPPORTED_EAPIS: 6 7 8
# @AUTHOR:
# Original author: Andres Loeh <kosmikus@gentoo.org>
# Original author: Duncan Coutts <dcoutts@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: for packages that make use of the Haskell Common Architecture for Building Applications and Libraries (cabal)
# @DESCRIPTION:
# Basic instructions:
diff --git a/eclass/l10n.eclass b/eclass/l10n.eclass
index 8be84024d53c..487c7a30a055 100644
--- a/eclass/l10n.eclass
+++ b/eclass/l10n.eclass
@@ -1,7 +1,6 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-# @ECLASS: l10n.eclass
# @DEAD
# Use plocale.eclass as drop-in replacement.
# Functions should be replaced as follows:
@@ -14,6 +13,7 @@
# the name of this eclass has caused some confusion, because it operates
# on LINGUAS and is unrelated to L10N.
#
+# @ECLASS: l10n.eclass
# @MAINTAINER:
# Ulrich Müller <ulm@gentoo.org>
# @AUTHOR:
diff --git a/eclass/pax-utils.eclass b/eclass/pax-utils.eclass
index 9c4903d24b61..f48dcdafe015 100644
--- a/eclass/pax-utils.eclass
+++ b/eclass/pax-utils.eclass
@@ -7,7 +7,7 @@
# @AUTHOR:
# Author: Kevin F. Quinn <kevquinn@gentoo.org>
# Author: Anthony G. Basile <blueness@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: functions to provide PaX markings for hardened kernels
# @DESCRIPTION:
#
@@ -22,7 +22,7 @@
# to contain either "PT", "XT" or "none". The default is none
case ${EAPI:-0} in
- [567]) ;;
+ 5|6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index c07d483fd1f0..57a2c95dd10a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -2,14 +2,12 @@
# Distributed under the terms of the GNU General Public License v2
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
-# @SUPPORTED_EAPIS: 5 6 7
+# @SUPPORTED_EAPIS: 5 6 7 8
DESCRIPTION="The GNU Compiler Collection"
HOMEPAGE="https://gcc.gnu.org/"
-# TODO: Please audit this inherit list on future EAPI bumps and ideally
-# conditonalise them where possible.
-inherit eutils flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
+inherit flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
tc_is_live() {
[[ ${PV} == *9999* ]]
@@ -29,11 +27,11 @@ fi
FEATURES=${FEATURES/multilib-strict/}
-case ${EAPI:-0} in
- 0|1|2|3|4*) die "Need to upgrade to at least EAPI=5" ;;
- 5*|6) inherit eapi7-ver ;;
- 7) ;;
- *) die "I don't speak EAPI ${EAPI}." ;;
+case ${EAPI} in
+ 5|6) inherit eapi7-ver eutils ;;
+ 7) inherit eutils ;;
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
@@ -99,6 +97,11 @@ elif [[ ${GCC_PV} == *_rc* ]] ; then
SNAPSHOT=${GCC_PV%_rc*}-RC-${GCC_PV##*_rc}
fi
+# Require minimum gcc version to simplify assumptions.
+# Normally we would require gcc-6+ (based on sys-devel/gcc)
+# but we still have sys-devel/gcc-apple-4.2.1_p5666.
+tc_version_is_at_least 4.2.1 || die "${ECLASS}: ${GCC_RELEASE_VER} is too old."
+
PREFIX=${TOOLCHAIN_PREFIX:-${EPREFIX}/usr}
LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}}
@@ -124,9 +127,9 @@ IUSE="test vanilla +nls"
RESTRICT="!test? ( test )"
tc_supports_dostrip() {
- case ${EAPI:-0} in
- 5*|6) return 1 ;;
- 7) return 0 ;;
+ case ${EAPI} in
+ 5|6) return 1 ;;
+ 7|8) return 0 ;;
*) die "Update apply_patches() for ${EAPI}." ;;
esac
}
@@ -140,24 +143,16 @@ tc_has_feature() {
}
if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
- # --enable-altivec was dropped before gcc-4. We don't set it.
- # We drop USE=altivec for newer gccs only to avoid rebuilds
- # for most stable users. Once gcc-10 is stable we can drop it.
- if ! tc_version_is_at_least 10; then
- IUSE+=" altivec"
- fi
IUSE+=" debug +cxx +nptl" TC_FEATURES+=(nptl)
[[ -n ${PIE_VER} ]] && IUSE+=" nopie"
[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
- # fortran support appeared in 4.1, but 4.1 needs outdated mpfr
- tc_version_is_at_least 4.2 && IUSE+=" +fortran" TC_FEATURES+=(fortran)
- tc_version_is_at_least 3 && IUSE+=" doc hardened multilib objc"
+ IUSE+=" +fortran" TC_FEATURES+=(fortran)
+ IUSE+=" doc hardened multilib objc"
tc_version_is_between 3 7 && IUSE+=" awt gcj" TC_FEATURES+=(gcj)
- tc_version_is_at_least 3.3 && IUSE+=" pgo"
- tc_version_is_at_least 4.0 &&
- IUSE+=" objc-gc" TC_FEATURES+=(objc-gc)
- tc_version_is_at_least 4.1 && IUSE+=" libssp objc++"
- tc_version_is_at_least 4.2 && IUSE+=" +openmp"
+ IUSE+=" pgo"
+ IUSE+=" objc-gc" TC_FEATURES+=(objc-gc)
+ IUSE+=" libssp objc++"
+ IUSE+=" +openmp"
tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
tc_version_is_at_least 4.7 && IUSE+=" go"
# sanitizer support appeared in gcc-4.8, but <gcc-5 does not
@@ -173,15 +168,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
IUSE+=" graphite" TC_FEATURES+=(graphite)
tc_version_is_between 4.9 8 && IUSE+=" cilk"
tc_version_is_at_least 4.9 && IUSE+=" ada"
-
- # Don't enable USE=vtv starting from gcc-10. Once gcc-10
- # stable everywhere disable by default on older versions
- # as well.
- if tc_version_is_at_least 10; then
- IUSE+=" vtv"
- elif tc_version_is_at_least 4.9; then
- IUSE+=" +vtv"
- fi
+ tc_version_is_at_least 4.9 && IUSE+=" vtv"
tc_version_is_at_least 5.0 && IUSE+=" jit"
tc_version_is_between 5.0 9 && IUSE+=" mpx"
tc_version_is_at_least 6.0 && IUSE+=" +pie +ssp +pch"
@@ -206,17 +193,15 @@ fi
#---->> DEPEND <<----
RDEPEND="sys-libs/zlib
- nls? ( virtual/libintl )"
-
-tc_version_is_at_least 3 && RDEPEND+=" virtual/libiconv"
-
-if tc_version_is_at_least 4 ; then
- GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0="
- if tc_version_is_at_least 4.3 ; then
- RDEPEND+=" ${GMP_MPFR_DEPS}"
- elif tc_has_feature fortran ; then
- RDEPEND+=" fortran? ( ${GMP_MPFR_DEPS} )"
- fi
+ virtual/libiconv
+ nls? ( virtual/libintl )
+"
+
+GMP_MPFR_DEPS=">=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0="
+if tc_version_is_at_least 4.3 ; then
+ RDEPEND+=" ${GMP_MPFR_DEPS}"
+elif tc_has_feature fortran ; then
+ RDEPEND+=" fortran? ( ${GMP_MPFR_DEPS} )"
fi
tc_version_is_at_least 4.5 && RDEPEND+=" >=dev-libs/mpc-0.8.1:0="
@@ -242,18 +227,22 @@ BDEPEND="
DEPEND="${RDEPEND}"
if tc_has_feature gcj ; then
- GCJ_DEPS=">=media-libs/libart_lgpl-2.1"
- GCJ_GTK_DEPS="
- x11-base/xorg-proto
- x11-libs/libXt
- x11-libs/libX11
- x11-libs/libXtst
- =x11-libs/gtk+-2*
- virtual/pkgconfig
+ DEPEND+="
+ gcj? (
+ awt? (
+ x11-base/xorg-proto
+ x11-libs/libXt
+ x11-libs/libX11
+ x11-libs/libXtst
+ =x11-libs/gtk+-2*
+ x11-libs/pango
+ virtual/pkgconfig
+ )
+ >=media-libs/libart_lgpl-2.1
+ app-arch/zip
+ app-arch/unzip
+ )
"
- tc_version_is_at_least 3.4 && GCJ_GTK_DEPS+=" x11-libs/pango"
- tc_version_is_at_least 4.2 && GCJ_DEPS+=" app-arch/zip app-arch/unzip"
- DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
fi
if tc_has_feature systemtap ; then
@@ -269,8 +258,8 @@ if tc_has_feature valgrind; then
BDEPEND+=" valgrind? ( dev-util/valgrind )"
fi
-case ${EAPI:-0} in
- 5*|6) DEPEND+=" ${BDEPEND}" ;;
+case ${EAPI} in
+ 5|6) DEPEND+=" ${BDEPEND}" ;;
esac
PDEPEND=">=sys-devel/gcc-config-2.3"
@@ -449,11 +438,11 @@ tc_apply_patches() {
einfo "$1"; shift
- case ${EAPI:-0} in
+ case ${EAPI} in
# Note: even for EAPI=6 we used 'epatch' semantics. To avoid
# breaking existing ebuilds use 'eapply' only in EAPI=7 or later.
- 5*|6) epatch "$@" ;;
- 7) eapply "$@" ;;
+ 5|6) epatch "$@" ;;
+ 7|8) eapply "$@" ;;
*) die "Update apply_patches() for ${EAPI}." ;;
esac
}
@@ -470,9 +459,9 @@ toolchain_src_prepare() {
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, commit ${EGIT_VERSION}"
fi
- case ${EAPI:-0} in
- 5*) epatch_user;;
- 6|7) eapply_user ;;
+ case ${EAPI} in
+ 5) epatch_user;;
+ 6|7|8) eapply_user ;;
*) die "Update toolchain_src_prepare() for ${EAPI}." ;;
esac
@@ -530,9 +519,7 @@ toolchain_src_prepare() {
sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828
# Prevent new texinfo from breaking old versions (see #198182, #464008)
- if tc_version_is_at_least 4.1; then
- tc_apply_patches "Remove texinfo (bug #198182, bug #464008)" "${FILESDIR}"/gcc-configure-texinfo.patch
- fi
+ tc_apply_patches "Remove texinfo (bug #198182, bug #464008)" "${FILESDIR}"/gcc-configure-texinfo.patch
# >=gcc-4
if [[ -x contrib/gcc_update ]] ; then
@@ -785,9 +772,7 @@ toolchain_src_configure() {
is_jit && GCC_LANG+=",jit"
if is_objc || is_objcxx ; then
GCC_LANG+=",objc"
- if tc_version_is_at_least 4 ; then
- use objc-gc && confgcc+=( --enable-objc-gc )
- fi
+ use objc-gc && confgcc+=( --enable-objc-gc )
is_objcxx && GCC_LANG+=",obj-c++"
fi
@@ -817,11 +802,11 @@ toolchain_src_configure() {
confgcc+=( --disable-nls )
fi
- tc_version_is_at_least 3.4 || confgcc+=( --disable-libunwind-exceptions )
+ confgcc+=( --disable-libunwind-exceptions )
# Use the default ("release") checking because upstream usually neglects
# to test "disabled" so it has a history of breaking. bug #317217
- if tc_version_is_at_least 3.4 && in_iuse debug ; then
+ if in_iuse debug ; then
# The "release" keyword is new to 4.0. bug #551636
local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
@@ -946,7 +931,7 @@ toolchain_src_configure() {
fi
fi
- tc_version_is_at_least 4.2 && confgcc+=( --disable-bootstrap )
+ confgcc+=( --disable-bootstrap )
else
if tc-is-static-only ; then
confgcc+=( --disable-shared )
@@ -971,10 +956,6 @@ toolchain_src_configure() {
$(use_enable nptl tls)
)
fi
- tc_version_is_between 3.3 3.4 && confgcc+=( --enable-sjlj-exceptions )
- if tc_version_is_between 3.4 4.3 ; then
- confgcc+=( --enable-clocale=uclibc )
- fi
;;
*-elf|*-eabi)
confgcc+=( --with-newlib )
@@ -1096,7 +1077,7 @@ toolchain_src_configure() {
# be small, and should simplify building of 64bit kernels in a 32bit
# userland by not needing sys-devel/kgcc64. #349405
case $(tc-arch) in
- ppc|ppc64) tc_version_is_at_least 3.4 && confgcc+=( --enable-targets=all ) ;;
+ ppc|ppc64) confgcc+=( --enable-targets=all ) ;;
sparc) tc_version_is_at_least 4.4 && confgcc+=( --enable-targets=all ) ;;
amd64|x86) tc_version_is_at_least 4.3 && confgcc+=( --enable-targets=all ) ;;
esac
@@ -1119,44 +1100,40 @@ toolchain_src_configure() {
fi
fi
- if tc_version_is_at_least 4.2 ; then
- if in_iuse openmp ; then
- # Make sure target has pthreads support. #326757 #335883
- # There shouldn't be a chicken & egg problem here as openmp won't
- # build without a C library, and you can't build that w/out
- # already having a compiler ...
- if ! is_crosscompile || \
- $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
- then
- confgcc+=( $(use_enable openmp libgomp) )
- else
- # Force disable as the configure script can be dumb #359855
- confgcc+=( --disable-libgomp )
- fi
+ if in_iuse openmp ; then
+ # Make sure target has pthreads support. #326757 #335883
+ # There shouldn't be a chicken & egg problem here as openmp won't
+ # build without a C library, and you can't build that w/out
+ # already having a compiler ...
+ if ! is_crosscompile || \
+ $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null
+ then
+ confgcc+=( $(use_enable openmp libgomp) )
else
- # For gcc variants where we don't want openmp (e.g. kgcc)
+ # Force disable as the configure script can be dumb #359855
confgcc+=( --disable-libgomp )
fi
+ else
+ # For gcc variants where we don't want openmp (e.g. kgcc)
+ confgcc+=( --disable-libgomp )
fi
- if tc_version_is_at_least 4.0 ; then
- if _tc_use_if_iuse libssp ; then
- confgcc+=( --enable-libssp )
+ if _tc_use_if_iuse libssp ; then
+ confgcc+=( --enable-libssp )
+ else
+ if hardened_gcc_is_stable ssp; then
+ export gcc_cv_libc_provides_ssp=yes
+ fi
+ if _tc_use_if_iuse ssp; then
+ # On some targets USE="ssp -libssp" is an invalid
+ # configuration as target libc does not provide
+ # stack_chk_* functions. Do not disable libssp there.
+ case ${CTARGET} in
+ mingw*|*-mingw*) ewarn "Not disabling libssp" ;;
+ *) confgcc+=( --disable-libssp ) ;;
+ esac
else
- if hardened_gcc_is_stable ssp; then
- export gcc_cv_libc_provides_ssp=yes
- fi
- if _tc_use_if_iuse ssp; then
- # On some targets USE="ssp -libssp" is an invalid
- # configuration as target libc does not provide
- # stack_chk_* functions. Do not disable libssp there.
- case ${CTARGET} in
- mingw*|*-mingw*) ewarn "Not disabling libssp" ;;
- *) confgcc+=( --disable-libssp ) ;;
- esac
- else
- confgcc+=( --disable-libssp )
- fi
+ confgcc+=( --disable-libssp )
fi
fi
@@ -1285,20 +1262,9 @@ downgrade_arch_flags() {
myarch=$(get-flag march)
mytune=$(get-flag mtune)
- # If -march=native isn't supported we have to tease out the actual arch
- if [[ ${myarch} == native || ${mytune} == native ]] ; then
- if ! tc_version_is_at_least 4.2 ${bver}; then
- arch=$($(tc-getCC) -march=native -v -E -P - </dev/null 2>&1 \
- | sed -rn "/cc1.*-march/s:.*-march=([^ ']*).*:\1:p")
- replace-cpu-flags native ${arch}
- fi
- fi
-
# Handle special -mtune flags
[[ ${mytune} == intel ]] && ! tc_version_is_at_least 4.9 ${bver} && replace-cpu-flags intel generic
- [[ ${mytune} == generic ]] && ! tc_version_is_at_least 4.2 ${bver} && filter-flags '-mtune=*'
[[ ${mytune} == x86-64 ]] && filter-flags '-mtune=*'
- tc_version_is_at_least 3.4 ${bver} || filter-flags '-mtune=*'
# "added" "arch" "replacement"
local archlist=(
@@ -1330,14 +1296,6 @@ downgrade_arch_flags() {
4.3 geode k6-2 # gcc.gnu.org/PR41989#c22
4.3 k8-sse3 k8
4.3 opteron-sse3 k8
- 3.4 athlon-fx x86-64
- 3.4 athlon64 x86-64
- 3.4 c3-2 c3
- 3.4 k8 x86-64
- 3.4 opteron x86-64
- 3.4 pentium-m pentium3
- 3.4 pentium3m pentium3
- 3.4 pentium4m pentium4
)
for ((i = 0; i < ${#archlist[@]}; i += 3)) ; do
@@ -1423,25 +1381,6 @@ gcc_do_filter_flags() {
filter-flags -frecord-gcc-switches # 490738
filter-flags -mno-rtm -mno-htm # 506202
- if tc_version_is_between 3.2 3.4 ; then
- # XXX: this is so outdated it's barely useful, but it don't hurt...
- replace-cpu-flags G3 750
- replace-cpu-flags G4 7400
- replace-cpu-flags G5 7400
-
- # XXX: should add a sed or something to query all supported flags
- # from the gcc source and trim everything else ...
- filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs
- filter-flags -f{no-,}stack-protector{,-all}
- filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
- # and warning options
- filter-flags -Wextra -Wstack-protector
- fi
- if ! tc_version_is_at_least 4.1 ; then
- filter-flags -fdiagnostics-show-option
- filter-flags -Wstack-protector
- fi
-
if tc_version_is_between 6 8 ; then
# -mstackrealign triggers crashes in exception throwing
# at least on ada: bug #688580
@@ -1449,35 +1388,33 @@ gcc_do_filter_flags() {
filter-flags -mstackrealign
fi
- if tc_version_is_at_least 3.4 ; then
- case $(tc-arch) in
- amd64|x86)
- filter-flags '-mcpu=*'
+ case $(tc-arch) in
+ amd64|x86)
+ filter-flags '-mcpu=*'
- tc_version_is_between 4.4 4.5 && append-flags -mno-avx # 357287
+ tc_version_is_between 4.4 4.5 && append-flags -mno-avx # 357287
- if tc_version_is_between 4.6 4.7 ; then
- # https://bugs.gentoo.org/411333
- # https://bugs.gentoo.org/466454
- replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
- fi
- ;;
- alpha)
- # https://bugs.gentoo.org/454426
- append-ldflags -Wl,--no-relax
- ;;
- sparc)
- # temporary workaround for random ICEs reproduced by multiple users
- # https://bugs.gentoo.org/457062
- tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1"
- ;;
- *-macos)
- # http://gcc.gnu.org/PR25127
- tc_version_is_between 4.0 4.2 && \
- filter-flags '-mcpu=*' '-march=*' '-mtune=*'
- ;;
- esac
- fi
+ if tc_version_is_between 4.6 4.7 ; then
+ # https://bugs.gentoo.org/411333
+ # https://bugs.gentoo.org/466454
+ replace-cpu-flags c3-2 pentium2 pentium3 pentium3m pentium-m i686
+ fi
+ ;;
+ alpha)
+ # https://bugs.gentoo.org/454426
+ append-ldflags -Wl,--no-relax
+ ;;
+ sparc)
+ # temporary workaround for random ICEs reproduced by multiple users
+ # https://bugs.gentoo.org/457062
+ tc_version_is_between 4.6 4.8 && MAKEOPTS+=" -j1"
+ ;;
+ *-macos)
+ # http://gcc.gnu.org/PR25127
+ tc_version_is_between 4.0 4.2 && \
+ filter-flags '-mcpu=*' '-march=*' '-mtune=*'
+ ;;
+ esac
strip-unsupported-flags
@@ -1592,7 +1529,7 @@ gcc_do_make() {
# resulting binaries natively ^^;
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all}
else
- if tc_version_is_at_least 3.3 && _tc_use_if_iuse pgo; then
+ if _tc_use_if_iuse pgo; then
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-profiledbootstrap}
else
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean}
@@ -1651,7 +1588,7 @@ gcc_do_make() {
if tc_version_is_at_least 4.3 ; then
cd "${CTARGET}"/libstdc++-v3/doc
emake doc-man-doxygen || ewarn "failed to make docs"
- elif tc_version_is_at_least 3.0 ; then
+ else
cd "${CTARGET}"/libstdc++-v3
emake doxygen-man || ewarn "failed to make docs"
fi
@@ -1798,11 +1735,9 @@ toolchain_src_install() {
rm -rf "${ED}"/usr/share/{man,info}
rm -rf "${D}"${DATAPATH}/{man,info}
else
- if tc_version_is_at_least 3.0 ; then
- local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man)
- if [[ -d ${cxx_mandir} ]] ; then
- cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/
- fi
+ local cxx_mandir=$(find "${WORKDIR}/build/${CTARGET}/libstdc++-v3" -name man)
+ if [[ -d ${cxx_mandir} ]] ; then
+ cp -r "${cxx_mandir}"/man? "${D}${DATAPATH}"/man/
fi
fi
@@ -1894,9 +1829,6 @@ toolchain_src_install() {
# when installing gcc, it dumps internal libraries into /usr/lib
# instead of the private gcc lib path
gcc_movelibs() {
- # older versions of gcc did not support --print-multi-os-directory
- tc_version_is_at_least 3.2 || return 0
-
# For non-target libs which are for CHOST and not CTARGET, we want to
# move them to the compiler-specific CHOST internal dir. This is stuff
# that you want to link against when building tools rather than building
@@ -2011,21 +1943,16 @@ create_gcc_env_entry() {
# workaround for libtool being stupid and using .la's from
# conflicting ABIs by using the first one in the search path
local ldpaths mosdirs
- if tc_version_is_at_least 3.2 ; then
- local mdir mosdir abi ldpath
- for abi in $(get_all_abis TARGET) ; do
- mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
- ldpath=${LIBPATH}
- [[ ${mdir} != "." ]] && ldpath+="/${mdir}"
- ldpaths="${ldpath}${ldpaths:+:${ldpaths}}"
-
- mosdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) -print-multi-os-directory)
- mosdirs="${mosdir}${mosdirs:+:${mosdirs}}"
- done
- else
- # Older gcc's didn't do multilib, so logic is simple.
- ldpaths=${LIBPATH}
- fi
+ local mdir mosdir abi ldpath
+ for abi in $(get_all_abis TARGET) ; do
+ mdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory)
+ ldpath=${LIBPATH}
+ [[ ${mdir} != "." ]] && ldpath+="/${mdir}"
+ ldpaths="${ldpath}${ldpaths:+:${ldpaths}}"
+
+ mosdir=$($(XGCC) $(get_abi_CFLAGS ${abi}) -print-multi-os-directory)
+ mosdirs="${mosdir}${mosdirs:+:${mosdirs}}"
+ done
cat <<-EOF > ${gcc_envd_file}
GCC_PATH="${BINPATH}"
@@ -2297,7 +2224,6 @@ is_jit() {
}
is_multilib() {
- tc_version_is_at_least 3 || return 1
_tc_use_if_iuse multilib
}