make: adjust in preparation to enable neon on arm64
[pcsx_rearmed.git] / Makefile.libretro
index 3edda64..e9df345 100644 (file)
@@ -72,7 +72,7 @@ else ifneq (,$(findstring CortexA73_G12B,$(platform)))
        fpic := -fPIC
        SHARED := -shared -Wl,-version-script=link.T
        ARCH = arm64
-       DYNAREC ?= ari64
+       DYNAREC = ari64
        CFLAGS += -fomit-frame-pointer -ffast-math -DARM
        CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53
 
@@ -82,7 +82,7 @@ else ifneq (,$(findstring h5,$(platform)))
        fpic := -fPIC
        SHARED := -shared -Wl,-version-script=link.T
        ARCH = arm64
-       DYNAREC ?= ari64
+       DYNAREC = ari64
        CFLAGS += -fomit-frame-pointer -ffast-math -DARM
        CPUFLAGS += -march=armv8-a+crc -mfpu=neon-fp-armv8 -mcpu=cortex-a53 -mtune=cortex-a53
 
@@ -149,6 +149,7 @@ else
        CXX = c++ -arch armv7 -isysroot $(IOSSDK)
        ARCH := arm
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        BUILTIN_GPU = neon
        CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
        ASFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon
@@ -191,16 +192,15 @@ else ifeq ($(platform), libnx)
    ARCH := arm64
    BUILTIN_GPU = unai
    HAVE_VFS_FD = 0
-   CFLAGS += -O3 -fomit-frame-pointer -ffast-math -I$(DEVKITPRO)/libnx/include/ -fPIE -Wl,--allow-multiple-definition -include $(LIBNX)/include/switch.h
+   CFLAGS += -O3 -fomit-frame-pointer -ffast-math -I$(DEVKITPRO)/libnx/include/ -fPIE -Wl,--allow-multiple-definition -include $(LIBNX)/include/switch.h
    CFLAGS += -specs=$(DEVKITPRO)/libnx/switch.specs -DNO_OS -DNO_DYLIB -DNO_SOCKET -D__arm64__ -D__ARM_NEON__
-   CFLAGS += -D__SWITCH__
+   CFLAGS += -D__SWITCH__ -DHAVE_LIBNX
    CFLAGS += -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -DHAVE_INTTYPES -DLSB_FIRST -ffast-math -mcpu=cortex-a57+crc+fp+simd -ffunction-sections
    CFLAGS += -ftree-vectorize
    CFLAGS += -Ifrontend/switch -ftree-vectorize
    LIBPTHREAD :=
    STATIC_LINKING=1
-   # Lightning requires rw/rx patches first
-   DYNAREC := 0
+   DYNAREC = ari64
 
 # Lakka Switch (arm64)
 else ifeq ($(platform), arm64)
@@ -242,6 +242,7 @@ else ifeq ($(platform), vita)
 
 #      CFLAGS += -U__ARM_NEON__
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        BUILTIN_GPU = neon
 
        DYNAREC = ari64
@@ -300,6 +301,7 @@ else ifeq ($(platform), qnx)
        CC = qcc -Vgcc_ntoarmv7le
        CC_AS = $(CC)
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        DYNAREC = ari64
        BUILTIN_GPU = neon
        ARCH = arm
@@ -328,6 +330,7 @@ else ifeq ($(platform), rpi2)
        CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
        ASFLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        ARCH = arm
        BUILTIN_GPU = neon
        DYNAREC = ari64
@@ -339,6 +342,7 @@ else ifeq ($(platform), rpi3)
        CFLAGS += -marm -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
        ASFLAGS += -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        ARCH = arm
        BUILTIN_GPU = neon
        DYNAREC = ari64
@@ -359,6 +363,7 @@ else ifeq ($(platform), rpi4)
        CFLAGS += -marm -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
        ASFLAGS += -mcpu=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        ARCH = arm
        BUILTIN_GPU = neon
        DYNAREC = ari64
@@ -393,6 +398,7 @@ else ifeq ($(platform), classic_armv7_a7)
        CPPFLAGS += $(CFLAGS)
        ASFLAGS += $(CFLAGS)
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        ARCH = arm
        BUILTIN_GPU = neon
        DYNAREC = ari64
@@ -415,6 +421,7 @@ else ifeq ($(platform), classic_armv8_a35)
        -fmerge-all-constants -fno-math-errno -march=armv8-a \
        -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
        HAVE_NEON = 1
+       HAVE_NEON_ASM = 1
        ARCH = arm
        BUILTIN_GPU = neon
        DYNAREC = ari64
@@ -444,6 +451,7 @@ else ifneq (,$(findstring armv,$(platform)))
                CFLAGS += -mfpu=neon
                ASFLAGS += -mfpu=neon
                HAVE_NEON = 1
+               HAVE_NEON_ASM = 1
                BUILTIN_GPU = neon
        endif
        ifneq (,$(findstring softfloat,$(platform)))