Randomly linked riscv64 kernels built with clang/lld-16 hang too often
authorjca <jca@openbsd.org>
Sat, 11 Nov 2023 18:00:36 +0000 (18:00 +0000)
committerjca <jca@openbsd.org>
Sat, 11 Nov 2023 18:00:36 +0000 (18:00 +0000)
Use cat instead of sort -R to disable random relinking for now, until we
find the culprit.  For whoever interested, using cat or sort avoids the
problem but using sort -r makes it 100% reproducible in my tests.

Suggested by deraadt@

sys/arch/riscv64/conf/Makefile.riscv64

index 3f0a37d..ef6e918 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.riscv64,v 1.17 2023/09/06 01:47:37 jsg Exp $
+#      $OpenBSD: Makefile.riscv64,v 1.18 2023/11/11 18:00:36 jca Exp $
 
 # For instructions on building kernels consult the config(8) and options(4)
 # manual pages.
@@ -34,7 +34,7 @@ CWARNFLAGS=   -Werror -Wall -Wimplicit-function-declaration \
 CMACHFLAGS=    -march=rv64gc -mcmodel=medany -mno-relax \
                -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 CMACHFLAGS+=   -ffreestanding ${NOPIE_FLAGS}
-SORTR=         sort -R
+SORTR=         cat
 .if ${IDENT:M-DNO_PROPOLICE}
 CMACHFLAGS+=   -fno-stack-protector
 .endif