distribution/packages/games/libretro/parallel-n64/patches/arm/parallel-n64-add_platform.patch

63 lines
2.5 KiB
Diff
Raw Normal View History

2022-02-05 14:23:32 +00:00
--- a/Makefile
+++ b/Makefile
@@ -280,6 +280,59 @@
PLATFORM_EXT := unix
WITH_DYNAREC=arm
HAVE_NEON=1
+
+# Emuelec Amlogic
+else ifneq (,$(findstring Amlogic,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T
+ fpic = -fPIC
+ GLES = 1
+ GL_LIB := -lGLESv2
+ CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -DARM_FIX -DCLASSIC
+ PLATFORM_EXT := unix
+ WITH_DYNAREC=arm
+ HAVE_NEON=1
+
+ ifneq (,$(findstring Amlogic-ng,$(platform)))
+ ASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a73 -mtune=cortex-a73.cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ else
+ ASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a53 -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ endif
+
+ CPUFLAGS += -O2 \
+ -fno-lto -fuse-linker-plugin -fno-semantic-interposition -fno-trapping-math \
+ -fdata-sections -ffunction-sections -Wl,--gc-sections \
+ -fno-stack-protector -fno-ident -fomit-frame-pointer \
+ -falign-functions=32 -falign-jumps=1 -falign-loops=1 \
+ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
+ -fno-strict-aliasing -fmerge-all-constants -fno-math-errno
+ ifneq (,$(findstring Amlogic-ng,$(platform)))
+ CPUFLAGS += -marm -mtune=cortex-a73.cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ else
+ CPUFLAGS += -marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ endif
+
+# Emuelec OdroidGoA
+else ifneq (,$(findstring Odroidgoa,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T
+ fpic = -fPIC
+ GLES = 1
+ GL_LIB := -lGLESv2
+ CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -D__NEON_OPT -DNOSSE -DARM_FIX -DCLASSIC
+ PLATFORM_EXT := unix
+ WITH_DYNAREC=arm
+ HAVE_NEON=1
+ ASFLAGS += -D__ARM_NEON__ -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+
+ CPUFLAGS += -O2 \
+ -fno-lto -fuse-linker-plugin -fno-semantic-interposition -fno-trapping-math \
+ -fdata-sections -ffunction-sections -Wl,--gc-sections \
+ -fno-stack-protector -fno-ident -fomit-frame-pointer \
+ -falign-functions=32 -falign-jumps=1 -falign-loops=1 \
+ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
+ -fno-strict-aliasing -fmerge-all-constants -fno-math-errno
+ CPUFLAGS += -marm -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard
# OS X
else ifneq (,$(findstring osx,$(platform)))