This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] GAS/MIPS: Add `-mfix-r5900' option for the R5900 short loop errata
Hi Maciej,
> > > Did you run regression-testing with your change? How did you verify it?
> >
> > Yes, I checked it with "make RUNTESTFLAGS=mips.exp check-gas", including
> > provisionally discarding -mfix-r5900 from the file r5900-fix.d to verify
> > that a test failure was triggered.
>
> What target was that with though?
It was "mipsr5900el-unknown-linux-gnu".
> > As usual, six unrelated tests fail in the R5900 target test suite:
> >
> > FAIL: MIPS CP0 register disassembly (numeric)
> > FAIL: MIPS CP0 register disassembly (mips32)
> > FAIL: MIPS CP0 register disassembly (mips32r2)
> > FAIL: MIPS CP0 register disassembly (mips64)
> > FAIL: MIPS CP0 register disassembly (mips64r2)
> > FAIL: MIPS CP0 register disassembly (sb1)
>
> But are these actual regressions or preexisting failures?
These are preexisting failures. Updating to HEAD this morning yields
two additional ones:
FAIL: MIPS MIPS64 MIPS-3D ASE instructions (-mips3d flag)
FAIL: MIPS MIPS64 MDMX ASE instructions (-mdmx flag)
As mentioned a while ago, there is also a preexisting build error with
the GDB part of Binutils:
CXX gdb.o
In file included from ../../gdb/defs.h:28:0,
from ../../gdb/gdb.c:19:
../../gdb/common/common-defs.h:71:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
#define _FORTIFY_SOURCE 2
<built-in>: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1619: gdb.o] Error 1
I just filed a bug report for that here:
https://sourceware.org/bugzilla/show_bug.cgi?id=23835
I apply this patch as a workaround:
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -67,7 +67,7 @@
optimization is required because _FORTIFY_SOURCE only works when
optimization is enabled. */
-#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0 && 0
#define _FORTIFY_SOURCE 2
#endif
Fredrik