* [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
@ 2017-12-30 12:22 Anthony G. Basile
2017-12-30 14:08 ` Michael Orlitzky
2017-12-30 17:18 ` Andreas K. Huettel
0 siblings, 2 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-12-30 12:22 UTC (permalink / raw
To: Gentoo Development
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
Hi everyone,
We've been stuck on EAPI=4 with toolchain.eclass for a while. This is
causing problems with subslotting libraries like mpfr, mpc, gmp and isl
that gcc depend on (see bug #642316). I went through and made the
changes necessary to get the eclass up to EAPI=5 and compile tested
across the board (ie all dependent ebuilds) for amd64. Everything looks
good, so please review and I'll commit if we're okay.
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : blueness@gentoo.org
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA
[-- Attachment #2: 0001-toolchain.eclass-update-to-EAPI-5-standards.patch --]
[-- Type: text/plain, Size: 9183 bytes --]
From b4a707673b7a3e36959a071292807945b07fd018 Mon Sep 17 00:00:00 2001
From: "Anthony G. Basile" <blueness@gentoo.org>
Date: Sat, 30 Dec 2017 06:56:29 -0500
Subject: [PATCH 1/2] toolchain.eclass: update to EAPI=5 standards
This eclass is inherited by ebuilds in sys-devel/{gcc,kgcc64,gcc-apple},
each which make use of different IUSE flags. This causes problems with
`use X` construcitons when X is not in the IUSE flags. At EAPI=4 this
simply emitted a warning, while at EAPI=5 this is an error. We update
the eclass to make use of use_if_iuse and similar constructions where
necessary to bring the eclass into compliance with EAPI=5.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
---
eclass/toolchain.eclass | 69 ++++++++++++++++++++++++++-----------------------
1 file changed, 36 insertions(+), 33 deletions(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index a038303ec7f..bf6aa89e2fb 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -496,7 +496,7 @@ toolchain_src_prepare() {
do_gcc_PIE_patches
epatch_user
- if ( tc_version_is_at_least 4.8.2 || use hardened ) && ! use vanilla ; then
+ if ( tc_version_is_at_least 4.8.2 || use_if_iuse hardened ) && ! use vanilla ; then
make_gcc_hard
fi
@@ -538,7 +538,7 @@ toolchain_src_prepare() {
fi
# >= gcc-4.3 doesn't bundle ecj.jar, so copy it
- if tc_version_is_at_least 4.3 && use gcj ; then
+ if tc_version_is_at_least 4.3 && use_if_iuse gcj ; then
if tc_version_is_at_least 4.5 ; then
einfo "Copying ecj-4.5.jar"
cp -pPR "${DISTDIR}/ecj-4.5.jar" "${S}/ecj.jar" || die
@@ -648,20 +648,20 @@ make_gcc_hard() {
# Gcc >= 6.X we can use configurations options to turn pie/ssp on as default
if tc_version_is_at_least 6.0 ; then
- if use pie ; then
+ if use_if_iuse pie ; then
einfo "Updating gcc to use automatic PIE building ..."
fi
- if use ssp ; then
+ if use_if_iuse ssp ; then
einfo "Updating gcc to use automatic SSP building ..."
fi
- if use hardened ; then
+ if use_if_iuse hardened ; then
# Will add some optimatizion as default.
gcc_hard_flags+=" -DEXTRA_OPTIONS"
# rebrand to make bug reports easier
BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
fi
else
- if use hardened ; then
+ if use_if_iuse hardened ; then
# rebrand to make bug reports easier
BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened}
if hardened_gcc_works ; then
@@ -909,7 +909,7 @@ toolchain_src_configure() {
# Use the default ("release") checking because upstream usually neglects
# to test "disabled" so it has a history of breaking. #317217
- if tc_version_is_at_least 3.4 ; then
+ if tc_version_is_at_least 3.4 && in_iuse debug ; then
# The "release" keyword is new to 4.0. #551636
local off=$(tc_version_is_at_least 4.0 && echo release || echo no)
confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes ${off})}" )
@@ -922,7 +922,7 @@ toolchain_src_configure() {
)
# If we want hardened support with the newer piepatchset for >=gcc 4.4
- if tc_version_is_at_least 4.4 && want_minispecs ; then
+ if tc_version_is_at_least 4.4 && want_minispecs && in_iuse hardened ; then
confgcc+=( $(use_enable hardened esp) )
fi
@@ -934,7 +934,7 @@ toolchain_src_configure() {
fi
# Support to disable pch when building libstdcxx
- if tc_version_is_at_least 6.0 && ! use pch ; then
+ if tc_version_is_at_least 6.0 && ! use_if_iuse pch ; then
confgcc+=( --disable-libstdcxx-pch )
fi
@@ -1058,12 +1058,12 @@ toolchain_src_configure() {
gcc-multilib-configure
# ppc altivec support
- confgcc+=( $(use_enable altivec) )
+ in_iuse altivec && confgcc+=( $(use_enable altivec) )
# gcc has fixed-point arithmetic support in 4.3 for mips targets that can
# significantly increase compile time by several hours. This will allow
# users to control this feature in the event they need the support.
- tc_version_is_at_least 4.3 && confgcc+=( $(use_enable fixed-point) )
+ tc_version_is_at_least 4.3 && in_iuse fixed-point && confgcc+=( $(use_enable fixed-point) )
case $(tc-is-softfloat) in
yes) confgcc+=( --with-float=soft ) ;;
@@ -1229,23 +1229,26 @@ toolchain_src_configure() {
# graphite was added in 4.4 but we only support it in 4.8+ due to external
# library issues. #448024
- if tc_version_is_at_least 5.0 ; then
+ if tc_version_is_at_least 5.0 && in_iuse graphite ; then
confgcc+=( $(use_with graphite isl) )
use graphite && confgcc+=( --disable-isl-version-check )
- elif tc_version_is_at_least 4.8 ; then
+ elif tc_version_is_at_least 4.8 && in_iuse graphite ; then
confgcc+=( $(use_with graphite cloog) )
use graphite && confgcc+=( --disable-isl-version-check )
elif tc_version_is_at_least 4.4 ; then
confgcc+=( --without-{cloog,ppl} )
fi
- if tc_version_is_at_least 4.8 ; then
+ if tc_version_is_at_least 4.8 && in_iuse sanitize ; then
confgcc+=( $(use_enable sanitize libsanitizer) )
fi
- if tc_version_is_at_least 6.0 ; then
+ if tc_version_is_at_least 6.0 && in_iuse pie ; then
+ confgcc+=( $(use_enable pie default-pie) )
+ fi
+
+ if tc_version_is_at_least 6.0 && in_iuse ssp ; then
confgcc+=(
- $(use_enable pie default-pie)
# This defaults to -fstack-protector-strong.
$(use_enable ssp default-ssp)
)
@@ -1575,7 +1578,7 @@ gcc_do_make() {
# resulting binaries natively ^^;
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all}
else
- if tc_version_is_at_least 3.3 && use pgo; then
+ if tc_version_is_at_least 3.3 && use_if_iuse pgo; then
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-profiledbootstrap}
else
GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean}
@@ -1619,7 +1622,7 @@ gcc_do_make() {
${GCC_MAKE_TARGET} \
|| die "emake failed with ${GCC_MAKE_TARGET}"
- if ! is_crosscompile && use cxx && use_if_iuse doc ; then
+ if ! is_crosscompile && use_if_iuse cxx && use_if_iuse doc ; then
if type -p doxygen > /dev/null ; then
if tc_version_is_at_least 4.3 ; then
cd "${CTARGET}"/libstdc++-v3/doc
@@ -1786,7 +1789,7 @@ toolchain_src_install() {
# Rather install the script, else portage with changing $FILESDIR
# between binary and source package borks things ....
- if ! is_crosscompile ; then
+ if ! is_crosscompile && [[ ${PN} != "kgcc64" ]] ; then
insinto "${DATAPATH#${EPREFIX}}"
newins "$(prefixify_ro "${FILESDIR}"/awk/fixlafiles.awk-no_gcc_la)" fixlafiles.awk || die
exeinto "${DATAPATH#${EPREFIX}}"
@@ -2080,7 +2083,7 @@ toolchain_pkg_postinst() {
eselect compiler-shadow update all
fi
- if ! is_crosscompile ; then
+ if ! is_crosscompile && [[ ${PN} != "kgcc64" ]] ; then
echo
ewarn "If you have issues with packages unable to locate libstdc++.la,"
ewarn "then try running 'fix_libtool_files.sh' on the old gcc versions."
@@ -2245,13 +2248,13 @@ gcc-lang-supported() {
is_ada() {
gcc-lang-supported ada || return 1
- use ada
+ use_if_iuse ada
}
is_cxx() {
gcc-lang-supported 'c++' || return 1
! is_crosscompile && tc_version_is_at_least 4.8 && return 0
- use cxx
+ use_if_iuse cxx
}
is_d() {
@@ -2261,27 +2264,27 @@ is_d() {
is_f77() {
gcc-lang-supported f77 || return 1
- use fortran
+ use_if_iuse fortran
}
is_f95() {
gcc-lang-supported f95 || return 1
- use fortran
+ use_if_iuse fortran
}
is_fortran() {
gcc-lang-supported fortran || return 1
- use fortran
+ use_if_iuse fortran
}
is_gcj() {
gcc-lang-supported java || return 1
- use cxx && use_if_iuse gcj
+ use_if_iuse cxx && use_if_iuse gcj
}
is_go() {
gcc-lang-supported go || return 1
- use cxx && use_if_iuse go
+ use_if_iuse cxx && use_if_iuse go
}
is_jit() {
@@ -2291,7 +2294,7 @@ is_jit() {
is_multilib() {
tc_version_is_at_least 3 || return 1
- use multilib
+ use_if_iuse multilib
}
is_objc() {
@@ -2301,7 +2304,7 @@ is_objc() {
is_objcxx() {
gcc-lang-supported 'obj-c++' || return 1
- use cxx && use_if_iuse objc++
+ use_if_iuse cxx && use_if_iuse objc++
}
# Grab a variable from the build system (taken from linux-info.eclass)
@@ -2369,12 +2372,12 @@ want_minispecs() {
if tc_version_is_at_least 6.0 ; then
return 0
fi
- if tc_version_is_at_least 4.3.2 && use hardened ; then
+ if tc_version_is_at_least 4.3.2 && use_if_iuse hardened ; then
if ! want_pie ; then
ewarn "PIE_VER or SPECS_VER is not defined in the GCC ebuild."
elif use vanilla ; then
ewarn "You will not get hardened features if you have the vanilla USE-flag."
- elif use nopie && use nossp ; then
+ elif use_if_iuse nopie && use_if_iuse nossp ; then
ewarn "You will not get hardened features if you have the nopie and nossp USE-flag."
elif ! hardened_gcc_works ; then
ewarn "Your $(tc-arch) arch is not supported."
@@ -2388,11 +2391,11 @@ want_minispecs() {
}
want_pie() {
- ! use hardened && [[ -n ${PIE_VER} ]] && use nopie && return 1
+ ! use_if_iuse hardened && [[ -n ${PIE_VER} ]] && use_if_iuse nopie && return 1
[[ -n ${PIE_VER} ]] && [[ -n ${SPECS_VER} ]] && return 0
tc_version_is_at_least 4.3.2 && return 1
[[ -z ${PIE_VER} ]] && return 1
- use !nopie && return 0
+ use_if_iuse !nopie && return 0
return 1
}
--
2.13.6
[-- Attachment #3: 0002-sys-devel-kgcc64-bump-all-ebuilds-to-EAPI-5.patch --]
[-- Type: text/plain, Size: 8203 bytes --]
From adee96c035ca2e496a9029e14ed73e30f1654185 Mon Sep 17 00:00:00 2001
From: "Anthony G. Basile" <blueness@gentoo.org>
Date: Sat, 30 Dec 2017 07:05:32 -0500
Subject: [PATCH 2/2] sys-devel/kgcc64: bump all ebuilds to EAPI=5
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
---
sys-devel/kgcc64/kgcc64-4.1.2.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.2.4.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.3.5.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.4.5.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.4.6.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.5.3.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.5.4.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.6.4.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.7.3.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.7.4.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.8.3.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.8.5.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-4.9.4.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-5.4.0.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-6.3.0.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-6.4.0.ebuild | 2 +-
sys-devel/kgcc64/kgcc64-7.2.0.ebuild | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/sys-devel/kgcc64/kgcc64-4.1.2.ebuild b/sys-devel/kgcc64/kgcc64-4.1.2.ebuild
index 1b944aebd72..5167b58d76c 100644
--- a/sys-devel/kgcc64/kgcc64-4.1.2.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.1.2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.2.4.ebuild b/sys-devel/kgcc64/kgcc64-4.2.4.ebuild
index 280b4f0fb81..c9eb6d4b9f9 100644
--- a/sys-devel/kgcc64/kgcc64-4.2.4.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.2.4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.3.5.ebuild b/sys-devel/kgcc64/kgcc64-4.3.5.ebuild
index d42caa3d104..910aeeeb5f3 100644
--- a/sys-devel/kgcc64/kgcc64-4.3.5.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.3.5.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.4.5.ebuild b/sys-devel/kgcc64/kgcc64-4.4.5.ebuild
index a40dfa3752d..c4661c45331 100644
--- a/sys-devel/kgcc64/kgcc64-4.4.5.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.4.5.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.4.6.ebuild b/sys-devel/kgcc64/kgcc64-4.4.6.ebuild
index 4cf0932591d..288f6a36ce0 100644
--- a/sys-devel/kgcc64/kgcc64-4.4.6.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.4.6.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.5.3.ebuild b/sys-devel/kgcc64/kgcc64-4.5.3.ebuild
index 4d7b7305dff..534876d3d04 100644
--- a/sys-devel/kgcc64/kgcc64-4.5.3.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.5.3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.5.4.ebuild b/sys-devel/kgcc64/kgcc64-4.5.4.ebuild
index f89cae01887..6ef14cdbae1 100644
--- a/sys-devel/kgcc64/kgcc64-4.5.4.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.5.4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.6.4.ebuild b/sys-devel/kgcc64/kgcc64-4.6.4.ebuild
index df9275b1676..451454f9796 100644
--- a/sys-devel/kgcc64/kgcc64-4.6.4.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.6.4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.7.3.ebuild b/sys-devel/kgcc64/kgcc64-4.7.3.ebuild
index 0fb3d04c68e..b6e103924a4 100644
--- a/sys-devel/kgcc64/kgcc64-4.7.3.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.7.3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.7.4.ebuild b/sys-devel/kgcc64/kgcc64-4.7.4.ebuild
index e126ea64f8d..c647916357e 100644
--- a/sys-devel/kgcc64/kgcc64-4.7.4.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.7.4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.8.3.ebuild b/sys-devel/kgcc64/kgcc64-4.8.3.ebuild
index 731074eedc1..0f779daf229 100644
--- a/sys-devel/kgcc64/kgcc64-4.8.3.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.8.3.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.8.5.ebuild b/sys-devel/kgcc64/kgcc64-4.8.5.ebuild
index 90d69128a02..6098c6c1222 100644
--- a/sys-devel/kgcc64/kgcc64-4.8.5.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.8.5.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-4.9.4.ebuild b/sys-devel/kgcc64/kgcc64-4.9.4.ebuild
index ec2766a42d2..e0b5155d33f 100644
--- a/sys-devel/kgcc64/kgcc64-4.9.4.ebuild
+++ b/sys-devel/kgcc64/kgcc64-4.9.4.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-5.4.0.ebuild b/sys-devel/kgcc64/kgcc64-5.4.0.ebuild
index ec2766a42d2..e0b5155d33f 100644
--- a/sys-devel/kgcc64/kgcc64-5.4.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-5.4.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-6.3.0.ebuild b/sys-devel/kgcc64/kgcc64-6.3.0.ebuild
index ded474dcdfa..3fff5a31f19 100644
--- a/sys-devel/kgcc64/kgcc64-6.3.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-6.3.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-6.4.0.ebuild b/sys-devel/kgcc64/kgcc64-6.4.0.ebuild
index ded474dcdfa..3fff5a31f19 100644
--- a/sys-devel/kgcc64/kgcc64-6.4.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-6.4.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
diff --git a/sys-devel/kgcc64/kgcc64-7.2.0.ebuild b/sys-devel/kgcc64/kgcc64-7.2.0.ebuild
index 798eef00c20..9776211cbaa 100644
--- a/sys-devel/kgcc64/kgcc64-7.2.0.ebuild
+++ b/sys-devel/kgcc64/kgcc64-7.2.0.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=5
case ${CHOST} in
hppa*) CTARGET=hppa64-${CHOST#*-};;
--
2.13.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
2017-12-30 12:22 [gentoo-dev] Patches to update toolchain.eclass to EAPI=5 Anthony G. Basile
@ 2017-12-30 14:08 ` Michael Orlitzky
2017-12-30 14:13 ` Anthony G. Basile
2017-12-30 17:18 ` Andreas K. Huettel
1 sibling, 1 reply; 6+ messages in thread
From: Michael Orlitzky @ 2017-12-30 14:08 UTC (permalink / raw
To: gentoo-dev
On 12/30/2017 07:22 AM, Anthony G. Basile wrote:
> use_if_iuse !nopie && return 0
Does this work? The "use" function supports negation (undocumented, but
it's in the PMS), but I don't think use_if_iuse does.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
2017-12-30 14:08 ` Michael Orlitzky
@ 2017-12-30 14:13 ` Anthony G. Basile
2017-12-30 15:06 ` Anthony G. Basile
0 siblings, 1 reply; 6+ messages in thread
From: Anthony G. Basile @ 2017-12-30 14:13 UTC (permalink / raw
To: gentoo-dev
On 12/30/17 9:08 AM, Michael Orlitzky wrote:
> On 12/30/2017 07:22 AM, Anthony G. Basile wrote:
>> use_if_iuse !nopie && return 0
>
> Does this work? The "use" function supports negation (undocumented, but
> it's in the PMS), but I don't think use_if_iuse does.
>
Okay I'll read the code and test. You're right that I just assumed it
worked liked "use" wrt negation so the semantics need to be checked.
Thanks for looking this over carefully.
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : blueness@gentoo.org
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
2017-12-30 14:13 ` Anthony G. Basile
@ 2017-12-30 15:06 ` Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-12-30 15:06 UTC (permalink / raw
To: gentoo-dev
On 12/30/17 9:13 AM, Anthony G. Basile wrote:
> On 12/30/17 9:08 AM, Michael Orlitzky wrote:
>> On 12/30/2017 07:22 AM, Anthony G. Basile wrote:
>>> use_if_iuse !nopie && return 0
>>
>> Does this work? The "use" function supports negation (undocumented, but
>> it's in the PMS), but I don't think use_if_iuse does.
>>
>
> Okay I'll read the code and test. You're right that I just assumed it
> worked liked "use" wrt negation so the semantics need to be checked.
>
> Thanks for looking this over carefully.
>
It looks like it would not work as expected because eutils.eclass has
in_iuse() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${#} -eq 1 ]] || die "Invalid args to ${FUNCNAME}()"
local flag=${1}
local liuse=( ${IUSE} )
has "${flag}" "${liuse[@]#[+-]}"
}
use_if_iuse() {
in_iuse $1 || return 1
use $1
}
So $1 in use_if_iuse binds to "!nopie" and then in in_iuse again to
"!nopie" which then messes up the has line, looking for a flag named
"!nopie" in IUSE which will always be true.
I'll change that line to
use_if_iuse nopie || return 0
Grepping the tree, I see only instances of
if ! use_if_iuse X ...
which is good.
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : blueness@gentoo.org
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
2017-12-30 12:22 [gentoo-dev] Patches to update toolchain.eclass to EAPI=5 Anthony G. Basile
2017-12-30 14:08 ` Michael Orlitzky
@ 2017-12-30 17:18 ` Andreas K. Huettel
2017-12-31 0:18 ` Anthony G. Basile
1 sibling, 1 reply; 6+ messages in thread
From: Andreas K. Huettel @ 2017-12-30 17:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Anthony G. Basile
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
Am Samstag, 30. Dezember 2017, 13:22:52 CET schrieb Anthony G. Basile:
> Hi everyone,
>
> We've been stuck on EAPI=4 with toolchain.eclass for a while. This is
> causing problems with subslotting libraries like mpfr, mpc, gmp and isl
> that gcc depend on (see bug #642316). I went through and made the
> changes necessary to get the eclass up to EAPI=5 and compile tested
> across the board (ie all dependent ebuilds) for amd64. Everything looks
> good, so please review and I'll commit if we're okay.
- confgcc+=( $(use_enable altivec) )
+ in_iuse altivec && confgcc+=( $(use_enable altivec) )
^ Just as an example, such a construct may change the "default setting" when
no altivec useflag exists...
Imagine that upstream enables altivec by default (?). In earlier eapis,
use_enable with a non-existing useflag returned --disable-altivec (?). Now,
without the useflag, no setting is passed to configure, and it's enabled.
So, while this all works in principle, it may need careful per-flag review.
--
Dr. Andreas K. Hüttel
tel. +49 151 241 67748 (mobile)
e-mail mail@akhuettel.de
http://www.akhuettel.de/
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-dev] Patches to update toolchain.eclass to EAPI=5
2017-12-30 17:18 ` Andreas K. Huettel
@ 2017-12-31 0:18 ` Anthony G. Basile
0 siblings, 0 replies; 6+ messages in thread
From: Anthony G. Basile @ 2017-12-31 0:18 UTC (permalink / raw
To: gentoo-dev
On 12/30/17 12:18 PM, Andreas K. Huettel wrote:
> Am Samstag, 30. Dezember 2017, 13:22:52 CET schrieb Anthony G. Basile:
>> Hi everyone,
>>
>> We've been stuck on EAPI=4 with toolchain.eclass for a while. This is
>> causing problems with subslotting libraries like mpfr, mpc, gmp and isl
>> that gcc depend on (see bug #642316). I went through and made the
>> changes necessary to get the eclass up to EAPI=5 and compile tested
>> across the board (ie all dependent ebuilds) for amd64. Everything looks
>> good, so please review and I'll commit if we're okay.
>
> - confgcc+=( $(use_enable altivec) )
> + in_iuse altivec && confgcc+=( $(use_enable altivec) )
>
> ^ Just as an example, such a construct may change the "default setting" when
> no altivec useflag exists...
>
> Imagine that upstream enables altivec by default (?). In earlier eapis,
> use_enable with a non-existing useflag returned --disable-altivec (?). Now,
> without the useflag, no setting is passed to configure, and it's enabled.
>
> So, while this all works in principle, it may need careful per-flag review.
>
Okay so I tested and found that there is no change in the default
settings due to the above construct (and there are a few). The way I
did it was I built >=gcc-4.9.4 with and without the toolchain.eclass
patch and compared the config.log's (there's about 33 per version of
gcc). There were no substantial differences. If there would have been
a change in the default behavior, then lines like following would have
shown a difference.
$ /var/tmp/portage/sys-devel/gcc-7.2.0/work/gcc-7.2.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/include/g++-v7
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.2.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls
--without-included-gettext --enable-checking=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion=Gentoo 7.2.0
p1.1 --disable-esp --enable-libstdcxx-time --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-altivec
--disable-fixed-point --enable-targets=all --disable-libgcj
--enable-libgomp --disable-libmudflap --disable-libssp
--disable-libcilkrts --disable-libmpx --enable-vtable-verify
--enable-libvtv --enable-lto --without-isl --enable-libsanitizer
--disable-default-pie --enable-default-ssp
I didn't test earlier gcc versions because they're masked. I tested
only on amd64 but I think that's oaky. The only flag my tests don't
cover is the altivec flag (which is for ppc/ppc64), but it defaults off
on all gcc versions.
I think this puts your concern to rest.
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : blueness@gentoo.org
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-31 0:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 12:22 [gentoo-dev] Patches to update toolchain.eclass to EAPI=5 Anthony G. Basile
2017-12-30 14:08 ` Michael Orlitzky
2017-12-30 14:13 ` Anthony G. Basile
2017-12-30 15:06 ` Anthony G. Basile
2017-12-30 17:18 ` Andreas K. Huettel
2017-12-31 0:18 ` Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox