From c5bd6813c160ef570f02a7cb34dfb9f4e65d17a8 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 26 Jun 2021 14:47:54 +0000 Subject: [PATCH] Build ld.so with --march=rv64imac on riscv64 to be absolutely sure that ld.so doesn't use the FP registers. ok deraadt@ --- libexec/ld.so/riscv64/Makefile.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/ld.so/riscv64/Makefile.inc b/libexec/ld.so/riscv64/Makefile.inc index c8ecff04984..14bfabf60cf 100644 --- a/libexec/ld.so/riscv64/Makefile.inc +++ b/libexec/ld.so/riscv64/Makefile.inc @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile.inc,v 1.1 2021/04/28 15:16:26 drahn Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2021/06/26 14:47:54 kettenis Exp $ CFLAGS += -fpic -CFLAGS += -march=rv64gc # this prevents the use of float in ld.so +CFLAGS += -march=rv64imac # this prevents the use of float in ld.so AFLAGS += -D_STANDALONE +AFLAGS += -march=rv64imac CPPFLAGS += -I${.CURDIR}/../../lib/libc/arch/riscv64 LD_SCRIPT = ${.CURDIR}/${MACHINE_CPU}/ld.script -- 2.20.1