toolchain.eclass: restore RESTRICT=strip on <gcc-9.2-r1, bug #699446
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 6 Nov 2019 23:21:41 +0000 (23:21 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 6 Nov 2019 23:29:54 +0000 (23:29 +0000)
commit d16e2840220 ("rename USE=regression-test to USE=test")
added a 'RESTRICT="!test? ( test )"' assignment and accidentally
overrode existing RESTRICT="strip" one. That reintroduced excessive
stripping regression.

Move RESTRICT assignments closer to one another and restore
RESTRICT="strip".

Reported-by: sargastic@gmail.com
Closes: https://bugs.gentoo.org/699446
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass

index 5f8fd446c6193cc86188fa77d4147c6e84861625..99643eafdd0fe6f07be3c2ff0276308714ef0297 100644 (file)
@@ -30,16 +30,6 @@ case ${EAPI:-0} in
        *) die "I don't speak EAPI ${EAPI}." ;;
 esac
 
-tc_supports_dostrip() {
-       case ${EAPI:-0} in
-               5*|6) return 1 ;;
-               7) return 0 ;;
-               *) die "Update apply_patches() for ${EAPI}." ;;
-       esac
-}
-
-tc_supports_dostrip || RESTRICT="strip" # cross-compilers need controlled stripping
-
 EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
        src_compile src_test src_install pkg_postinst pkg_postrm
 
@@ -140,6 +130,16 @@ fi
 IUSE="test vanilla +nls"
 RESTRICT="!test? ( test )"
 
+tc_supports_dostrip() {
+       case ${EAPI:-0} in
+               5*|6) return 1 ;;
+               7) return 0 ;;
+               *) die "Update apply_patches() for ${EAPI}." ;;
+       esac
+}
+
+tc_supports_dostrip || RESTRICT+=" strip" # cross-compilers need controlled stripping
+
 TC_FEATURES=()
 
 tc_has_feature() {