From 360b1cb52170127c234c099f93a82a55459123d5 Mon Sep 17 00:00:00 2001 From: Rix Date: Tue, 29 Sep 2026 03:43:14 -0700 Subject: [PATCH] Build the PS1 target soft-float The PS1 has no FPU. string.format converts to double for %f, %e and %g, and a hard-float build emits mtc1/cvt.d.w there, which stops a real console dead. --- src/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile b/src/Makefile index da7499f..268401c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,6 +27,9 @@ PREFIX ?= mipsel-none-elf endif ARCHFLAGS = -march=mips1 -mabi=32 -EL -fno-pic -mno-shared -mno-abicalls -mfp32 -mno-llsc ARCHFLAGS += -fno-stack-protector -nostdlib -ffreestanding +# string.format converts to double for %f, %e and %g. The PS1 has no FPU, so +# that has to go through libgcc's soft-float routines. +ARCHFLAGS += -msoft-float CPPFLAGS = -Wall -DLUA_COMPAT_ALL -DLUA_TARGET_PSX CPPFLAGS += -ffunction-sections CPPFLAGS += -fdata-sections -mno-gpopt -fomit-frame-pointer