aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/bluemsx/1000-trimui-build.patch6
-rw-r--r--patches/fmsx/1000-trimui-build.patch48
2 files changed, 51 insertions, 3 deletions
diff --git a/patches/bluemsx/1000-trimui-build.patch b/patches/bluemsx/1000-trimui-build.patch
index d4026df..b140866 100644
--- a/patches/bluemsx/1000-trimui-build.patch
+++ b/patches/bluemsx/1000-trimui-build.patch
@@ -1,5 +1,5 @@
diff --git a/Makefile.libretro b/Makefile.libretro
-index 0e8b073..040e734 100644
+index 0e8b073..aec4ea2 100644
--- a/Makefile.libretro
+++ b/Makefile.libretro
@@ -428,6 +428,20 @@ else ifneq (,$(findstring armv,$(platform)))
@@ -38,10 +38,10 @@ index 0e8b073..040e734 100644
endif
+ifeq ($(PROFILE), GENERATE)
-+ CFLAGS += -fprofile-generate=./profile/fceumm
++ CFLAGS += -fprofile-generate=./profile/$(TARGET_NAME)
+ LDFLAGS += -lgcov
+else ifeq ($(PROFILE), APPLY)
-+ CFLAGS += -fprofile-use -fprofile-dir=../profile/fceumm -fbranch-probabilities
++ CFLAGS += -fprofile-use -fprofile-dir=../profile/$(TARGET_NAME) -fbranch-probabilities
+endif
+
include Makefile.common
diff --git a/patches/fmsx/1000-trimui-build.patch b/patches/fmsx/1000-trimui-build.patch
new file mode 100644
index 0000000..d2d7f3a
--- /dev/null
+++ b/patches/fmsx/1000-trimui-build.patch
@@ -0,0 +1,48 @@
+diff --git a/Makefile b/Makefile
+index 6b4eb85..7281477 100644
+--- a/Makefile
++++ b/Makefile
+@@ -103,6 +103,20 @@ else ifeq ($(platform), miyoo)
+ CFLAGS += -march=armv5te -mtune=arm926ej-s
+ CFLAGS += -fomit-frame-pointer -ffast-math
+
++# trimui
++else ifeq ($(platform), trimui)
++ TARGET := $(TARGET_NAME)_libretro.so
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
++ AR = $(CROSS_COMPILE)ar
++ SHARED := -shared -Wl,-version-script=link.T -Wl,-no-undefined
++ LDFLAGS += -fno-PIC -flto
++ CFLAGS += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -mtune=arm926ej-s -fno-PIC -flto
++ OPTIMIZE := -Ofast -DNDEBUG
++ ifeq (,$(DEBUG))
++ LDFLAGS += -s
++ endif
++
+ # iOS
+ else ifneq (,$(findstring ios,$(platform)))
+
+@@ -532,6 +546,8 @@ endif
+
+ ifeq ($(DEBUG), 1)
+ CFLAGS += -O0 -g
++else ifneq (,$(OPTIMIZE))
++ CFLAGS += $(OPTIMIZE)
+ else
+ CFLAGS += -O2 -DNDEBUG
+ endif
+@@ -546,6 +562,13 @@ else
+ endif
+ endif
+
++ifeq ($(PROFILE), GENERATE)
++ CFLAGS += -fprofile-generate=./profile/$(TARGET_NAME)
++ LDFLAGS += -lgcov
++else ifeq ($(PROFILE), APPLY)
++ CFLAGS += -fprofile-use -fprofile-dir=../profile/$(TARGET_NAME) -fbranch-probabilities
++endif
++
+ DEFINES += -D__LIBRETRO__ $(PLATFORM_DEFINES)
+
+ CFLAGS += $(fpic) $(DEFINES)