Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916573 - flag-o-matic.eclass: Consider allowing ordinary alignment flags (-f{,no-}align-{functions,jumps,loops}) in strip-flags
Summary: flag-o-matic.eclass: Consider allowing ordinary alignment flags (-f{,no-}alig...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 09:47 UTC by setun.90
Modified: 2024-09-13 07:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge.info,20.46 KB, text/plain)
2023-10-31 09:49 UTC, setun.90
Details

Note You need to log in before you can comment on or make changes to this bug.
Description setun.90 2023-10-31 09:47:23 UTC
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.
Comment 1 setun.90 2023-10-31 09:49:52 UTC
Created attachment 873766 [details]
emerge --info output
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-31 09:50:23 UTC
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.
Comment 3 Kostadin Shishmanov 2023-12-13 18:06:41 UTC
Could "-malign-data" also possibly be added to the allowed flags?
Comment 4 Luca Barbato gentoo-dev 2024-07-05 09:00:10 UTC
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.
Comment 5 setun.90 2024-09-13 07:42:36 UTC
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.