commit:     cf366abd1bd50a33755734bbfb8c0e8a49a5480e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 21 20:47:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 21 20:51:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf366abd

flag-o-matic.eclass: allow further MIPS errata flags

* We were missing 24k, r5900, vr4120, vr4130, sb1 [0].

* Chuck in -Wa,-mfix-loongson2f-nop while at it. The topic of -Wa,* is an 
interesting
  one, as we currently allow -Wl,*, so we should probably do the same for the 
assembler,
  but punt that to another time.

Note that we use r5900 and -Wa,-mfix-loongson2f-nop for building stages...

Prompted by discussion with immolo (see also 
fad75a344cbaada57ae490c3e8f88cdd5b35dadc).

[0] https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html#index-mfix-24k (and 
below)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/flag-o-matic.eclass | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 6540f59aa960..d377568327e6 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -89,7 +89,7 @@ _setup-allowed-flags() {
                '-fdiagnostics*' '-fplugin*'
                '-W*' -w
 
-               # CPPFLAGS and LDFLAGS
+               # CPPFLAGS and LDFLAGS (TODO: Allow -Wa,*?)
                '-[DUILR]*' '-Wl,*'
 
                # Linker choice flag
@@ -114,9 +114,15 @@ _setup-allowed-flags() {
                -mno-faster-structs -mfaster-structs -m32 -m64 -mx32 '-mabi=*'
                -mlittle-endian -mbig-endian -EL -EB -fPIC -mlive-g0 
'-mcmodel=*'
                -mstack-bias -mno-stack-bias -msecure-plt '-m*-toc' 
'-mfloat-abi=*'
-               -mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400
+
+               # MIPS errata
+               -mfix-24k -mno-fix-24k -mfix-r4000 -mno-fix-r4000
+               -mfix-r4400 -mno-fix-r4400 -mfix-r5900 -mno-fix-r5900
                -mfix-rm7000 -mno-fix-rm7000 -mfix-r9500 -mno-fix-r9500
-               -mfix-r10000 -mno-fix-r10000
+               -mfix-r10000 -mno-fix-r10000 -mfix-vr4120 -mno-fix-vr4120
+               -mfix-vr4130 -mfix-sb1 -mno-fix-sb1
+               '-Wa,-mfix-loongson2f-nop'
+
                '-mr10k-cache-barrier=*' -mthumb -marm
 
                # needed for arm64 (and in particular SCS)

Reply via email to