git: bd72252aace3 - main - [mips] revert r366664 - flip mips back from -O2 to -O

Kyle Evans kevans at freebsd.org
Wed Jan 20 15:00:31 UTC 2021


On Thu, Jan 14, 2021 at 7:26 AM Mateusz Guzik <mjguzik at gmail.com> wrote:
>
> This breaks tinderbox, for example:
>
> make[5]: "/usr/src/share/mk/sys.mk" line 169: Malformed conditional
> (${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc")
> make[5]: Fatal errors encountered -- cannot continue
> make[5]: stopped in /usr/obj/usr/src/mips.mips64/sys/BERI_NETFPGA_MDROOT
>

Adrian, ping. Tinderbox has been broken from this for nearly a full
week now, and it makes it hard to defend mips when we apparently can't
garner up the energy to fix stuff like this in a timely fashion.

sys.mk is way too early for checking COMPILER_TYPE, we should either
revert back to -O2 or to the previous version entirely by dropping the
COMPILER_TYPE check. freebsd-wifi-build can set CFLAGS to override it,
so it's tempting to say we should just revert this and you can
override CFLAGS in freebsd-wifi-build until you can work out why gcc6
vomits at runtime.

Thanks,

Kyle Evans

> On 1/14/21, Adrian Chadd <adrian at freebsd.org> wrote:
> > The branch main has been updated by adrian:
> >
> > URL:
> > https://cgit.FreeBSD.org/src/commit/?id=bd72252aace382921840ddbceea712b96f4ad242
> >
> > commit bd72252aace382921840ddbceea712b96f4ad242
> > Author:     Adrian Chadd <adrian at FreeBSD.org>
> > AuthorDate: 2021-01-12 21:13:20 +0000
> > Commit:     Adrian Chadd <adrian at FreeBSD.org>
> > CommitDate: 2021-01-14 07:03:53 +0000
> >
> >     [mips] revert r366664 - flip mips back from -O2 to -O
> >
> >     Now that I have -head fitting in 8MB of flash again, I can test
> >     out freebsd-head on my home AP test setup.  Unfortunately,
> >     the introduction of -O2 in r366664 causes the following infinite
> >     loop shortly after boot:
> >
> >     ------
> >
> >     MAP: No valid partition found at map/rootfs.uzip
> >     Warning: no time-of-day clock registered, system time will not be set
> > accurately
> >     start_init: trying /sbin/init
> >     BAD_PAGE_FAULT: pid 1 tid 100001 (init), uid 0: pc 0x4042c320 got a read
> > fault (type 0x2) at 0x2e3a0
> >     Trapframe Register Dump:
> >             zero: 0 at: 0   v0: 0   v1: 0
> >             a0: 0x1af34     a1: 0   a2: 0   a3: 0x7fffeff0
> >             t0: 0   t1: 0   t2: 0   t3: 0
> >             t4: 0   t5: 0   t6: 0   t7: 0
> >             t8: 0   t9: 0x152e8     s0: 0x7fffee84  s1: 0
> >             s2: 0   s3: 0   s4: 0   s5: 0
> >             s6: 0   s7: 0   k0: 0   k1: 0
> >             gp: 0x362c0     sp: 0x7fffedf0  s8: 0   ra: 0x40417df0
> >             sr: 0xf413      mullo: 0        mulhi: 0        badvaddr:
> > 0x2e3a0
> >             cause: 0xffffffff80000008       pc: 0x4042c31c
> >     Page table info for pc address 0x4042c320: pde = 0x80712000, pte =
> > 0xa002065a
> >     Dumping 4 words starting at pc address 0x4042c320:
> >     8f9980e0 80820000 10400067 00809825
> >     Page table info for bad address 0x2e3a0: pde = 0, pte = 0
> >
> >     ------
> >
> >     I'm not yet sure why, but until I figure it out with the mips64/cheri
> >     folk this should be reverted.
> >
> >     This should only use -O on GCC generated code for MIPS platforms.
> >
> >     Tested:
> >
> >     * QCA934x (mips74k) - WDR-3600/WDR-4300 APs
> >
> >     Differential Revision: https://reviews.freebsd.org/D28122
> > ---
> >  share/mk/sys.mk | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/share/mk/sys.mk b/share/mk/sys.mk
> > index 8f456b28593a..72f458397683 100644
> > --- a/share/mk/sys.mk
> > +++ b/share/mk/sys.mk
> > @@ -166,7 +166,14 @@ CC               ?=      c89
> >  CFLAGS               ?=      -O
> >  .else
> >  CC           ?=      cc
> > +.if ${MACHINE_CPUARCH} == "mips" && ${COMPILER_TYPE} == "gcc"
> > +# Note: there are currently issues generating code gcc-6.x targeting
> > +# code for at least mips32.  The system hits infinite page faults
> > +# when starting /sbin/init if -O2 is used.
> > +CFLAGS               ?=      -O -pipe
> > +.else
> >  CFLAGS               ?=      -O2 -pipe
> > +.endif
> >  .if defined(NO_STRICT_ALIASING)
> >  CFLAGS               +=      -fno-strict-aliasing
> >  .endif
> > _______________________________________________
> > dev-commits-src-all at freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
> > To unsubscribe, send any mail to
> > "dev-commits-src-all-unsubscribe at freebsd.org"
> >
>
>
> --
> Mateusz Guzik <mjguzik gmail.com>


More information about the dev-commits-src-all mailing list