From e6faefdc78928cb6b8ef2e1e31545d168471a3c7 Mon Sep 17 00:00:00 2001 From: jca Date: Sat, 11 Nov 2023 18:00:36 +0000 Subject: [PATCH] Randomly linked riscv64 kernels built with clang/lld-16 hang too often 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/riscv64/conf/Makefile.riscv64 b/sys/arch/riscv64/conf/Makefile.riscv64 index 3f0a37d69ee..ef6e918ed99 100644 --- a/sys/arch/riscv64/conf/Makefile.riscv64 +++ b/sys/arch/riscv64/conf/Makefile.riscv64 @@ -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 -- 2.20.1