Build ld.so with --march=rv64imac on riscv64 to be absolutely sure that
authorkettenis <kettenis@openbsd.org>
Sat, 26 Jun 2021 14:47:54 +0000 (14:47 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 26 Jun 2021 14:47:54 +0000 (14:47 +0000)
ld.so doesn't use the FP registers.

ok deraadt@

libexec/ld.so/riscv64/Makefile.inc

index c8ecff0..14bfabf 100644 (file)
@@ -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