summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliaspider2015-12-26 22:06:39 +0100
committeraliaspider2015-12-26 22:06:39 +0100
commit1eb9b1807dbe353ba28c5eddc9d3849a00707b83 (patch)
tree00911efd4c7d740112301657d6263cfa28947d8d
parentd47adaae518ce69e6bd7a3a2aba95e476f3089a8 (diff)
downloadsnes9x2002-1eb9b1807dbe353ba28c5eddc9d3849a00707b83.tar.gz
snes9x2002-1eb9b1807dbe353ba28c5eddc9d3849a00707b83.tar.bz2
snes9x2002-1eb9b1807dbe353ba28c5eddc9d3849a00707b83.zip
build fix for non-GCC compilers.
-rw-r--r--Makefile3
-rw-r--r--Makefile.common16
-rw-r--r--jni/Android.mk1
3 files changed, 14 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 7f2a6e1..edfd135 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,8 @@ else ifneq ($(findstring win,$(shell uname -a)),)
endif
endif
+HAVE_GCC = 0
+
ifeq ($(platform), unix)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
@@ -85,6 +87,7 @@ else ifeq ($(platform), ctr)
CFLAGS += -D_3DS
PLATFORM_DEFINES := -D_3DS
STATIC_LINKING := 1
+ HAVE_GCC = 1
else
TARGET := $(TARGET_NAME)_libretro.dll
CC = gcc
diff --git a/Makefile.common b/Makefile.common
index 92bc255..96bd406 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -74,15 +74,19 @@ SOURCES += $(CORE_DIR)/os9x_asm_cpu.c
DEFINES += -DASMCPU
endif
-DEFINES += -mstructure-size-boundary=32
+
DEFINES += -DARM_ASM
DEFINES += -DRIGHTSHIFT_IS_SAR
-# Do we need all this? Causes issues on non-GCC compilers, etc.
-DEFINES += -ffast-math
-DEFINES += -finline -finline-functions -fexpensive-optimizations
-DEFINES += -falign-functions=32 -falign-loops -falign-labels
-DEFINES += -falign-jumps -fstrict-aliasing -fsigned-char -frename-registers -fweb
+DEFINES += -finline -fsigned-char
DEFINES += -fomit-frame-pointer
+DEFINES += -ffast-math -fstrict-aliasing
+
+ifeq ($(HAVE_GCC), 1)
+DEFINES += -mstructure-size-boundary=32
+DEFINES += -finline-functions -fexpensive-optimizations
+DEFINES += -falign-functions=32 -falign-loops -falign-labels
+DEFINES += -falign-jumps -frename-registers -fweb
+endif
else
SOURCES += $(CORE_DIR)/ppu_.c
diff --git a/jni/Android.mk b/jni/Android.mk
index 2e2517d..d384867 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -8,6 +8,7 @@ ifeq ($(TARGET_ARCH),arm)
ARM_ASM = 1
ASM_CPU = 0
ASM_SPC700 = 0
+HAVE_GCC = 1
LOCAL_CFLAGS += -DANDROID_ARM
LOCAL_ARM_MODE := arm
endif