forked from MiyooCFW/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize retroarch cores: fceumm, mame2000, snes9x2002, tyrquake
- Loading branch information
Showing
6 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/Makefile.libretro b/Makefile.libretro | ||
index 522bd06..152101c 100644 | ||
--- a/Makefile.libretro | ||
+++ b/Makefile.libretro | ||
@@ -458,9 +458,11 @@ else ifeq ($(platform), miyoo) | ||
CC = /opt/miyoo/usr/bin/arm-linux-gcc | ||
CXX = /opt/miyoo/usr/bin/arm-linux-g++ | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar | ||
- fpic := -fPIC | ||
+ fpic := | ||
SHARED := -shared -Wl,--version-script=src/libretro/link.T -Wl,-no-undefined | ||
- PLATFORM_DEFINES += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s | ||
+ PLATFORM_DEFINES += -mcpu=arm926ej-s -Wno-write-strings -Wno-sign-compare -fomit-frame-pointer -fno-builtin -fno-common -fpermissive -Ofast -flto -fomit-frame-pointer -fno-builtin \ | ||
+ -fno-common -Wno-write-strings -Wno-sign-compare -ffast-math -ftree-vectorize \ | ||
+ -funswitch-loops -fno-strict-aliasing | ||
EXTERNAL_ZLIB = 1 | ||
|
||
# Windows MSVC 2017 all architectures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 64d8115..4dcf9d7 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -327,11 +327,11 @@ else ifeq ($(platform), miyoo) | ||
TARGET := $(TARGET_NAME)_libretro.so | ||
CC = /opt/miyoo/usr/bin/arm-linux-gcc | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar | ||
- fpic := -fPIC | ||
+ fpic := | ||
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined | ||
|
||
DISABLE_ERROR_LOGGING := 1 | ||
- CFLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s | ||
+ CFLAGS += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -Ofast -fdata-sections -ffunction-sections -fsingle-precision-constant -flto | ||
ARM = 1 | ||
USE_CYCLONE = 1 | ||
USE_DRZ80 = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
package/libretro-snes9x2002/0001-optimize-flags-enable-frameskip.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/Makefile b/Makefile | ||
index b6af83f..fa12a6d 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -250,12 +250,12 @@ else ifeq ($(platform), miyoo) | ||
CC = /opt/miyoo/usr/bin/arm-linux-gcc | ||
CXX = /opt/miyoo/usr/bin/arm-linux-g++ | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar | ||
- fpic := -fPIC | ||
+ fpic := | ||
ARM_ASM = 1 | ||
ASM_CPU = 0 | ||
ASM_SPC700 = 0 | ||
SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined | ||
- CFLAGS += -fomit-frame-pointer -ffast-math -fno-unroll-loops -flto -mcpu=arm926ej-s | ||
+ CFLAGS += -fomit-frame-pointer -ffast-math -fno-unroll-loops -flto -mcpu=arm926ej-s -fno-unroll-loops -fno-common -fno-stack-protector -fexpensive-optimizations | ||
CFLAGS += -DFAST_ALIGNED_LSB_WORD_ACCESS | ||
|
||
# Windows MSVC 2010 x64 | ||
@@ -396,7 +396,7 @@ LIBRETRO_DIR := ./libretro | ||
ifeq ($(DEBUG), 1) | ||
DEFINES += -O0 -g | ||
else ifneq (,$(findstring msvc,$(platform))) | ||
-DEFINES += -O2 -DNDEBUG=1 | ||
+DEFINES += -O3 -DNDEBUG=1 | ||
else | ||
DEFINES += -O3 -DNDEBUG=1 | ||
endif | ||
diff --git a/libretro/libretro_core_options.h b/libretro/libretro_core_options.h | ||
index ad03eae..db3ac50 100644 | ||
--- a/libretro/libretro_core_options.h | ||
+++ b/libretro/libretro_core_options.h | ||
@@ -68,7 +68,7 @@ struct retro_core_option_v2_definition option_defs_us[] = { | ||
{ "fixed_interval", "Fixed Interval" }, | ||
{ NULL, NULL }, | ||
}, | ||
- "disabled" | ||
+ "auto" | ||
}, | ||
{ | ||
"snes9x2002_frameskip_threshold", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/Makefile b/Makefile | ||
index ef82d42..bb51b40 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -232,9 +232,9 @@ else ifeq ($(platform), miyoo) | ||
TARGET := $(TARGET_NAME)_libretro.so | ||
CC = /opt/miyoo/usr/bin/arm-linux-gcc | ||
AR = /opt/miyoo/usr/bin/arm-linux-ar | ||
- fpic := -fPIC | ||
+ fpic := | ||
SHARED := -shared -Wl,--version-script=common/libretro-link.T | ||
- CFLAGS += -DDINGUX -D_MIYOO -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s | ||
+ CFLAGS += -DDINGUX -D_MIYOO -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -Ofast -fdata-sections -ffunction-sections -fsingle-precision-constant -flto -marm -DARM | ||
HAVE_NETWORKING=0 | ||
|
||
# Raspberry Pi 1 |