Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2020 14:27:27 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Brandon Bergren <bdragon@FreeBSD.org>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: head -r365932 on PowerMac G5 (2 dual-core sockets): Crashes before login prompt if powerd is enabled in /etc/rc.conf
Message-ID:  <D6DC1C60-E50D-4A12-9F3B-6CEBA6A76748@yahoo.com>
In-Reply-To: <92f57afb-33cb-4d38-be17-4b8c81cb9c89@www.fastmail.com>
References:  <52783D16-5DCA-45BC-9238-2518326454A1@yahoo.com> <6E99EE39-D2B8-415A-A5BF-823C0F0C22D6@yahoo.com> <cd9d2b72-219f-4550-a437-4ac3aa1da66d@www.fastmail.com> <AF27169A-00FC-4984-83C2-307EA885D7A1@yahoo.com> <11fe573a-24c3-47be-95ed-c601ec54f168@www.fastmail.com> <E23CF7F6-B69C-44C7-B356-4AB65E011268@yahoo.com> <B4D16405-1B0C-4500-866F-75F32FED235A@yahoo.com> <92f57afb-33cb-4d38-be17-4b8c81cb9c89@www.fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-Sep-22, at 12:45, Brandon Bergren <bdragon at FreeBSD.org> =
wrote:
>=20
> On Tue, Sep 22, 2020, at 2:35 PM, Mark Millard wrote:
>>=20
>> Seems to target 32 bit powerpc but the context I'm reporting is
>> for powerpc64 overall. May be the mis-compiles are not limited
>> to 32-bit powerpc variants?
>=20
> DOH! You're right,=20
>=20
> Try a build with _MINUS_O forced to -O2 and see if that fixes things.
>=20
> FWIW, there is a differential to change the default across the board @ =
https://reviews.freebsd.org/D26471 because the whole "inlines are not =
inlining" problem affects everything.
>=20
> The change boils down to LLVM 11 changing their default of what -O =
"means" to be -O1 instead of -O2, which breaks a bunch of kernel =
assumptions regarding inlining.
>=20

On the 2 dual-core socket G5:

# sysctl dev.cpu.0.freq
dev.cpu.0.freq: 2500

based on using:

# svnlite diff /usr/src/sys/conf/kern.pre.mk
Index: /usr/src/sys/conf/kern.pre.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- /usr/src/sys/conf/kern.pre.mk	(revision 365932)
+++ /usr/src/sys/conf/kern.pre.mk	(working copy)
@@ -51,15 +51,7 @@
 SIZE?=3D		size
=20
 .if defined(DEBUG)
-.if ${MACHINE_ARCH} =3D=3D "powerpc" || ${MACHINE_ARCH} =3D=3D =
"powerpcspe"
-# Work around clang 11 miscompile on 32 bit powerpc.
-_MINUS_O=3D	-O2
-.else
-_MINUS_O=3D	-O
-.endif
 CTFFLAGS+=3D	-g
-.else
-_MINUS_O=3D	-O2
 .endif
 .if ${MACHINE_CPUARCH} =3D=3D "amd64"
 .if ${COMPILER_TYPE} =3D=3D "clang"
@@ -68,7 +60,7 @@
 COPTFLAGS?=3D-O2 -frename-registers -pipe
 .endif
 .else
-COPTFLAGS?=3D${_MINUS_O} -pipe
+COPTFLAGS?=3D-O2 -pipe
 .endif
 .if !empty(COPTFLAGS:M-O[23s]) && =
empty(COPTFLAGS:M-fno-strict-aliasing)
 COPTFLAGS+=3D -fno-strict-aliasing


[I doubt that this had anything to do with the extremely
early 2-socket G4 boot failure, given what you had for
"powerpc": it should have been -O2 already.]


=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D6DC1C60-E50D-4A12-9F3B-6CEBA6A76748>