Added Optimisation for A7A7 and fixed Classic platform

This commit is contained in:
Ryan 'Swingflip' Hamlin 2018-10-25 13:11:55 +01:00
parent eff5914fa2
commit 75008d0a22
2 changed files with 39 additions and 8 deletions

View File

@ -21,8 +21,9 @@ AS_V = arm-linux-gnueabihf-as
CC_AS_V = arm-linux-gnueabihf-gcc-8
# Libretro Defines ####################
HAVE_CLASSIC = 1
#HAVE_CLASSIC = Classic Hook, disable some features
#HAVE_C_A7A7 = Classic Armv7 Cortex A7 optimisation override
#HAVE_HAKCHI = Hakchi Hook, change default configurations etc (TODO)
all: $(TARGET)
@ -30,7 +31,7 @@ retroarch:
#Build the RetroArch Binary for cross platform classics (ARMv7 Cortex A7)
patchelf --version #Check if you have patchelf installed... (sudo apt-get install patchelf)
./configure --host=arm-linux-gnueabihf --enable-mali_fbdev --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard
make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 -j #Cook it
make CC=$(CC_V) CXX=$(CXX_V) AS=$(AS_V) CC_AS=$(CC_AS_V) LDFLAGS_SDL=-lSDL2 HAVE_CLASSIC=1 HAVE_C_A7A7=1 HAVE_HAKCHI=1 -j #Cook it
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
#HAKCHI BUILD (NESC, SNESC)

View File

@ -7,11 +7,6 @@ ifeq ($(HAVE_STACK_USAGE), 1)
CFLAGS += -fstack-usage
endif
ifeq ($(HAVE_CLASSIC), 1)
LDFLAGS += -static-libgcc -static-libstdc++
CFLAGS += -DHAVE_CLASSIC
endif
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT=0
@ -1840,3 +1835,38 @@ endif
ifeq ($(HAVE_RPILED), 1)
OBJ += led/drivers/led_rpi.o
endif
##################################
### Classic Platform specifics ###
###############WIP################
# Help at https://modmyclassic.com/comp
ifeq ($(HAVE_CLASSIC), 1)
CFLAGS += -DHAVE_CLASSIC
endif
ifeq ($(HAVE_C_A7A7), 1)
C_A7A7_OPT = -Ofast \
-fno-lto \
-fdata-sections -ffunction-sections -Wl,--gc-sections \
-fno-stack-protector -fno-ident -fomit-frame-pointer \
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
-fmerge-all-constants -fno-math-errno \
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
CFLAGS += $(C_A7A7_OPT)
CXXFLAGS += $(C_A7A7_OPT)
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
else
CFLAGS += -march=armv7ve
# If gcc is 5.0 or later
ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
LDFLAGS += -static-libgcc -static-libstdc++
endif
endif
ifeq ($(HAVE_HAKCHI), 1)
CFLAGS += -DHAVE_HAKCHI
endif
##################################