commit:     f44d1becbe468a4e1c36a4819a6276b9ee0c9da2
Author:     Ian Jordan <immoloism <AT> gmail <DOT> com>
AuthorDate: Mon Oct 17 18:44:08 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 20:31:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f44d1bec

sys-libs/musl: Filter LTO

After discussing my bug with dalias on #musl I was informed that LTO has a 
negative
impact on Musl so fixing the issue I highlight rather than filtering wouldn't 
be the
desired outcome for the user.

This will also help crossdev users as a bonus as -flto applies to the
crosstoolchain and can be hard to spot at first.

Chat log to comfirm:

immolo: I ran into the -flto issue while testing musl built with lto and the 
only thing I can find on it was a workaround in 2015.
immolo: My question though is it even worth having lto enabled on musl in the 
first place as every distro just seems to filter it so
there must be a reason
dalias: not only is it not worth it. it's negative value
dalias: makes musl larger and slower
dalias: if you wanted libc.a to get LTO'd into static programs, that might have 
some value
dalias: but LTO on libc.so is worse than worthless

Closes: https://bugs.gentoo.org/877343
Thanks-to: dalias
Signed-off-by: Ian Jordan <immoloism <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27824
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/musl/musl-1.2.2-r8.ebuild | 1 +
 sys-libs/musl/musl-1.2.3-r4.ebuild | 1 +
 sys-libs/musl/musl-1.2.3.ebuild    | 1 +
 sys-libs/musl/musl-9999.ebuild     | 1 +
 4 files changed, 4 insertions(+)

diff --git a/sys-libs/musl/musl-1.2.2-r8.ebuild 
b/sys-libs/musl/musl-1.2.2-r8.ebuild
index a7b1acd0c36c..2c16357eb55f 100644
--- a/sys-libs/musl/musl-1.2.2-r8.ebuild
+++ b/sys-libs/musl/musl-1.2.2-r8.ebuild
@@ -88,6 +88,7 @@ src_prepare() {
 }
 
 src_configure() {
+       filter-lto # bug #877343
        tc-getCC ${CTARGET}
 
        just_headers && export CC=true

diff --git a/sys-libs/musl/musl-1.2.3-r4.ebuild 
b/sys-libs/musl/musl-1.2.3-r4.ebuild
index 1d60464d46a4..6f2527e85a39 100644
--- a/sys-libs/musl/musl-1.2.3-r4.ebuild
+++ b/sys-libs/musl/musl-1.2.3-r4.ebuild
@@ -104,6 +104,7 @@ src_prepare() {
 }
 
 src_configure() {
+       filter-lto # bug #877343
        tc-getCC ${CTARGET}
 
        just_headers && export CC=true

diff --git a/sys-libs/musl/musl-1.2.3.ebuild b/sys-libs/musl/musl-1.2.3.ebuild
index a7b1acd0c36c..2c16357eb55f 100644
--- a/sys-libs/musl/musl-1.2.3.ebuild
+++ b/sys-libs/musl/musl-1.2.3.ebuild
@@ -88,6 +88,7 @@ src_prepare() {
 }
 
 src_configure() {
+       filter-lto # bug #877343
        tc-getCC ${CTARGET}
 
        just_headers && export CC=true

diff --git a/sys-libs/musl/musl-9999.ebuild b/sys-libs/musl/musl-9999.ebuild
index 1d60464d46a4..6f2527e85a39 100644
--- a/sys-libs/musl/musl-9999.ebuild
+++ b/sys-libs/musl/musl-9999.ebuild
@@ -104,6 +104,7 @@ src_prepare() {
 }
 
 src_configure() {
+       filter-lto # bug #877343
        tc-getCC ${CTARGET}
 
        just_headers && export CC=true

Reply via email to