summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid G. F2021-06-22 00:20:15 +0200
committerGitHub2021-06-22 00:20:15 +0200
commit5bfd9ced9a94122f5d754e8639dfcf253fa4d5b6 (patch)
tree1a748f7dd10683aa78920f5e539ba85aaf5117b8 /Makefile
parent261b2db9bb65b63d4968f89deecdf92f1975011f (diff)
parentdbf72e95efd507d5a6255c25aee055a0a3c1350e (diff)
downloadpicogpsp-5bfd9ced9a94122f5d754e8639dfcf253fa4d5b6.tar.gz
picogpsp-5bfd9ced9a94122f5d754e8639dfcf253fa4d5b6.tar.bz2
picogpsp-5bfd9ced9a94122f5d754e8639dfcf253fa4d5b6.zip
Merge pull request #134 from davidgfnet/master
Some MIPS fixes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 13 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 6edf65c..cf0bfd1 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ else ifeq ($(platform), psp1)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = psp-gcc$(EXE_EXT)
AR = psp-ar$(EXE_EXT)
- CFLAGS += -DPSP -G0 -DUSE_BGR_FORMAT
+ CFLAGS += -DPSP -G0 -DUSE_BGR_FORMAT -DMIPS_HAS_R2_INSTS
CFLAGS += -I$(shell psp-config --pspsdk-path)/include
CFLAGS += -march=allegrex -mfp32 -mgp32 -mlong32 -mabi=eabi
CFLAGS += -fomit-frame-pointer -ffast-math
@@ -375,29 +375,26 @@ else ifeq ($(platform), mips32)
SHARED := -shared -nostdlib -Wl,--version-script=link.T
fpic := -fPIC -DPIC
CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
- CFLAGS += -fno-caller-saves
+ CFLAGS += -DMIPS_HAS_R2_INSTS
HAVE_DYNAREC := 1
CPU_ARCH := mips
-# emscripten
-else ifeq ($(platform), emscripten)
- TARGET := $(TARGET_NAME)_libretro_$(platform).bc
- STATIC_LINKING = 1
-
-# GCW0
-else ifeq ($(platform), gcw0)
+# MIPS64
+else ifeq ($(platform), mips64n32)
TARGET := $(TARGET_NAME)_libretro.so
- CC = /opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc
- CXX = /opt/gcw0-toolchain/usr/bin/mipsel-linux-g++
- AR = /opt/gcw0-toolchain/usr/bin/mipsel-linux-ar
SHARED := -shared -nostdlib -Wl,--version-script=link.T
fpic := -fPIC -DPIC
- CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
+ CFLAGS += -fomit-frame-pointer -ffast-math -march=mips64 -mabi=n32 -mhard-float
HAVE_DYNAREC := 1
CPU_ARCH := mips
-# GCW0 (OpenDingux Beta)
-else ifeq ($(platform), gcw0-odbeta)
+# emscripten
+else ifeq ($(platform), emscripten)
+ TARGET := $(TARGET_NAME)_libretro_$(platform).bc
+ STATIC_LINKING = 1
+
+# GCW0 (OD and OD Beta)
+else ifeq ($(platform), gcw0)
TARGET := $(TARGET_NAME)_libretro.so
CC = /opt/gcw0-toolchain/usr/bin/mipsel-linux-gcc
CXX = /opt/gcw0-toolchain/usr/bin/mipsel-linux-g++
@@ -405,10 +402,7 @@ else ifeq ($(platform), gcw0-odbeta)
SHARED := -shared -nostdlib -Wl,--version-script=link.T
fpic := -fPIC -DPIC
CFLAGS += -fomit-frame-pointer -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
- # The ASM code and/or MIPS dynarec of GPSP does not respect
- # MIPS calling conventions, so we must use '-fno-caller-saves'
- # for the OpenDingux Beta build
- CFLAGS += -fno-caller-saves
+ CFLAGS += -DMIPS_HAS_R2_INSTS
HAVE_DYNAREC := 1
CPU_ARCH := mips