Skip to content

Commit

Permalink
Add flags -Ofast -fdata-sections -ffunction-sections -fsingle-precisi…
Browse files Browse the repository at this point in the history
…on-constant -fno-PIC -flto to gpsp core (MiyooCFW#80)
  • Loading branch information
tiopex authored Jan 5, 2024
1 parent 04fc020 commit 78cd798
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions package/libretro-gpsp/0001-fno-PIC.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 5a3bab7..0658014 100644
--- a/Makefile
+++ b/Makefile
@@ -482,7 +482,7 @@ else ifeq ($(platform), miyoo)
CXX = /opt/miyoo/usr/bin/arm-linux-g++
AR = /opt/miyoo/usr/bin/arm-linux-ar
SHARED := -shared -nostdlib -Wl,--version-script=link.T
- fpic := -fPIC -DPIC
+ fpic := -fno-PIC
CFLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s
CFLAGS += -DSMALL_TRANSLATION_CACHE
HAVE_DYNAREC := 1
2 changes: 1 addition & 1 deletion package/libretro-gpsp/libretro-gpsp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LIBRETRO_GPSP_LICENSE = GPL-2.0
LIBRETRO_GPSP_LICENSE_FILES = COPYING

define LIBRETRO_GPSP_BUILD_CMDS
CFLAGS="$(TARGET_CFLAGS) $(COMPILER_COMMONS_CFLAGS_SO)" \
CFLAGS="$(TARGET_CFLAGS) $(COMPILER_COMMONS_CFLAGS_SO) -Ofast -fdata-sections -ffunction-sections -fsingle-precision-constant -flto" \
CXXFLAGS="$(TARGET_CXXFLAGS) $(COMPILER_COMMONS_CXXFLAGS_SO)" \
$(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" -C $(@D) platform="$(RETROARCH_LIBRETRO_PLATFORM)" OPTIMIZE="$(COMPILER_COMMONS_LDFLAGS_SO)"
$(TARGET_STRIP) --strip-unneeded $(@D)/*_libretro.so
Expand Down

0 comments on commit 78cd798

Please sign in to comment.