summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-13 01:04:59 +0000
committerSam James <sam@gentoo.org>2022-05-13 02:49:46 +0000
commit4f9c7396f2c71d160d79f0320126ef63d6f981c7 (patch)
tree696661c33e469e7ce43f01ac90268d7d4faca1b0 /eclass/toolchain.eclass
parentdev-util/mingw64-runtime: unset toolchain vars when cross-compiling (diff)
downloadgentoo-4f9c7396f2c71d160d79f0320126ef63d6f981c7.tar.gz
gentoo-4f9c7396f2c71d160d79f0320126ef63d6f981c7.tar.bz2
gentoo-4f9c7396f2c71d160d79f0320126ef63d6f981c7.zip
toolchain.eclass: followup style tweaks
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass18
1 files changed, 12 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index d6c20a9e1e97..0bc6bb821ab0 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -27,7 +27,7 @@ tc_is_live() {
if tc_is_live ; then
EGIT_REPO_URI="https://gcc.gnu.org/git/gcc.git"
- # naming style:
+ # Naming style:
# gcc-10.1.0_pre9999 -> gcc-10-branch
# Note that the micro version is required or lots of stuff will break.
# To checkout master set gcc_LIVE_BRANCH="master" in the ebuild before
@@ -121,7 +121,7 @@ fi
DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share/gcc-data/${CTARGET}/${GCC_CONFIG_VER}}
-# Dont install in /usr/include/g++-v3/, but in gcc internal directory.
+# Don't install in /usr/include/g++-v3/, but instead to gcc's internal directory.
# We will handle /usr/include/g++-v3/ with gcc-config ...
STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VER/\.*/}}
@@ -148,11 +148,14 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
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
# support modern glibc.
tc_version_is_at_least 5 && IUSE+=" +sanitize" TC_FEATURES+=( sanitize )
+
# Note:
# <gcc-4.8 supported graphite, it required forked ppl
# versions which we dropped. Since graphite was also experimental in
@@ -161,15 +164,18 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
# <gcc-6.5 supported graphite, it required old incompatible isl
tc_version_is_at_least 6.5 &&
IUSE+=" graphite" TC_FEATURES+=( graphite )
+
tc_version_is_between 4.9 8 && IUSE+=" cilk"
tc_version_is_at_least 4.9 && IUSE+=" ada"
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"
+
# systemtap is a gentoo-specific switch: bug #654748
tc_version_is_at_least 8.0 &&
IUSE+=" systemtap" TC_FEATURES+=( systemtap )
+
tc_version_is_at_least 9.0 && IUSE+=" d"
tc_version_is_at_least 9.1 && IUSE+=" lto"
tc_version_is_at_least 10 && IUSE+=" cet"
@@ -362,7 +368,7 @@ get_gcc_src_uri() {
if tc_is_live ; then
: # Nothing to do w/git snapshots.
elif [[ -n ${GCC_TARBALL_SRC_URI} ]] ; then
- # pull gcc tarball from another location. Frequently used by gnat-gpl.
+ # 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="https://gcc.gnu.org/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.xz"
@@ -564,7 +570,7 @@ do_gcc_PIE_patches() {
want_pie || return 0
use vanilla && return 0
- einfo "Applying pie patches ..."
+ einfo "Applying PIE patches ..."
eapply "${WORKDIR}"/piepatch/*.patch
BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}"
@@ -649,7 +655,7 @@ make_gcc_hard() {
fi
fi
- # We want to be able to control the PIEe patch logic via something other
+ # We want to be able to control the PIE patch logic via something other
# than ALL_CFLAGS...
sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
-e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
@@ -747,7 +753,7 @@ toolchain_src_configure() {
# issues with 3rd party jar implementations. bug #384291
export JAR=no
- # For hardened gcc 4.3 piepatchset to build the hardened specs
+ # For hardened gcc 4.3: add the pie patchset to build the hardened specs
# file (build.specs) to use when building gcc.
if ! tc_version_is_at_least 4.4 && want_minispecs ; then
setup_minispecs_gcc_build_specs