As the summary says. Reproducible: Always Steps to Reproduce: 1. Include any of -f{,no-}align-{functions,jumps,loops} in {C{,XX},F{,C}}FLAGS 2. Emerge any package with extensive flag filtering (e.g. sys-devel/gcc, sys-libs/glibc, sys-devel/binutils, etc.) 3. cat /var/db/pkg/${package_in_question}/{C{,XX},F{,C}}FLAGS Actual Results: Alignment flags are filtered. Expected Results: Alignment flags are present.
Created attachment 873766 [details] emerge --info output
As discussed on IRC but ftr, I'm fine with this in principle, but I'm going to check gcc's bugzilla & also ask them on irc if there's any issues from the past they're aware of.
Could "-malign-data" also possibly be added to the allowed flags?
While at it we should allow -mstrict-align and -mvector-strict-align since they should be used to prevent https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115789 on RISC-V.
Independently of the above, I just remembered two additional flags in the subject of alignment: - -f{,no-}align-labels - aligns all address labels, not just jumps or loops. - -flimit-function-alignment - prevents aligning functions smaller than the current padding. Not to add them to the title, just for completeness.