From 23b767af73549eeb4dd3069e09d0f2fcb88669a8 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Mar 2023 00:41:01 +0000 Subject: gentoo auto-resync : 22:03:2023 - 00:41:01 --- eclass/toolchain.eclass | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'eclass/toolchain.eclass') diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2d7801259019..8ffdd9e26f1e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1090,6 +1090,14 @@ toolchain_src_configure() { confgcc+=( --enable-libstdcxx-time ) fi + # This only controls whether the compiler *supports* LTO, not whether + # it's *built using* LTO. Hence we do it without a USE flag. + if tc_version_is_at_least 4.6 ; then + confgcc+=( --enable-lto ) + elif tc_version_is_at_least 4.5 ; then + confgcc+=( --disable-lto ) + fi + # Build compiler itself using LTO if tc_version_is_at_least 9.1 && _tc_use_if_iuse lto ; then build_config_targets+=( bootstrap-lto ) @@ -1164,6 +1172,10 @@ toolchain_src_configure() { avr) confgcc+=( --enable-shared --disable-threads ) ;; + nvptx*) + # "LTO is not supported for this target" + confgcc+=( --disable-lto ) + ;; esac if [[ -n ${needed_libc} ]] ; then @@ -1485,14 +1497,6 @@ toolchain_src_configure() { confgcc+=( $(use_with zstd) ) fi - # This only controls whether the compiler *supports* LTO, not whether - # it's *built using* LTO. Hence we do it without a USE flag. - if tc_version_is_at_least 4.6 ; then - confgcc+=( --enable-lto ) - elif tc_version_is_at_least 4.5 ; then - confgcc+=( --disable-lto ) - fi - # graphite was added in 4.4 but we only support it in 6.5+ due to external # library issues. bug #448024, bug #701270 if tc_version_is_at_least 6.5 && in_iuse graphite ; then -- cgit v1.2.3