Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Easy filter-lto per package cancellation?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Wed Apr 10, 2024 6:18 pm    Post subject: Easy filter-lto per package cancellation? Reply with quote

Looking for a easy way to workaround filter-lto.

The weakest way I see it is to:
Duplicate original ebuild in local repository.
Optionally revbump final build.
Optionally unkeyword revbumped ebuild.
Edit filter-lto directive.
Emerge new ebuild.


If possible if would be easier to only:
Duplicate original ebuild in [a dedicated] local repository.
Emerge new ebuild.

IIUC, that would require the containing local to be set in a way that would keep all the selected profile mechanisms but filter-lto one,
I went through the gentoo profile support, without working it out.

Any practical [generic] example for such a portage [alike] feature overload?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21650

PostPosted: Wed Apr 10, 2024 7:08 pm    Post subject: Reply with quote

Add an on-sync hook to patch flag-o-matic.eclass with the following:
Code:
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -273,6 +273,10 @@
 # Remove flags that enable LTO and those that depend on it
 filter-lto() {
        [[ $# -ne 0 ]] && die "filter-lto takes no arguments"
+       if [[ -n "${I_KNOW_I_WANT_TO_USE_LTO}" ]]; then
+               ewarn "$P called filter-lto; ignoring.  DO NOT FILE BUGS ABOUT THIS PACKAGE."
+               return
+       fi
        filter-flags '-flto*' -fwhole-program-vtables '-fsanitize=cfi*'
 }
 
Then set the corresponding environment variable using package.env.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Wed Apr 10, 2024 7:19 pm    Post subject: Reply with quote

Wow, impressively quick response. :)

Currently stuck with a heavily swapping emerge... :(
Can't wait to test this :wink:

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Wed Apr 10, 2024 10:19 pm    Post subject: Reply with quote

Hu wrote:
Add an on-sync hook to patch...

Isn't postsync hook' (Wiki) more accurate, or is it?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21650

PostPosted: Thu Apr 11, 2024 12:24 am    Post subject: Reply with quote

Yes, that is a way you could arrange for the patch to be applied at the proper time.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum