Re: head -r365932 on PowerMac G5 (2 dual-core sockets): Crashes before login prompt if powerd is enabled in /etc/rc.conf

Mark Millard via freebsd-ppc <[email protected]>
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]>
On 2020-Sep-22, at 12:45, Brandon Bergren <bdragon at FreeBSD.org> wrote:
> 
> On Tue, Sep 22, 2020, at 2:35 PM, Mark Millard wrote:
>> 
>> 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?
> 
> DOH! You're right, 
> 
> Try a build with _MINUS_O forced to -O2 and see if that fixes things.
> 
> 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.
> 
> 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.
> 

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


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

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.