summaryrefslogtreecommitdiff
path: root/eclass/toolchain.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-22 00:41:01 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-22 00:41:01 +0000
commit23b767af73549eeb4dd3069e09d0f2fcb88669a8 (patch)
tree7ad731ac748d72a48ae7079bc8fb0718c554d65d /eclass/toolchain.eclass
parent3003897133b1bcfe9a241c2708e938903879aee3 (diff)
gentoo auto-resync : 22:03:2023 - 00:41:01
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass20
1 files changed, 12 insertions, 8 deletions
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