removed harcoded sdk path in makefile

This commit is contained in:
Vincent-FK 2021-02-26 10:08:16 +01:00
parent d235d8c2a6
commit 5f720570b1
3 changed files with 30 additions and 55 deletions

View File

@ -30,9 +30,6 @@ ifeq ($(platform),)
endif endif
endif endif
platform = funkey
ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64) ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
else ifeq ($(firstword $(filter amd64,$(UNAME))),amd64) else ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)
@ -398,16 +395,14 @@ else ifeq ($(platform), gcw0)
# FunKey S # FunKey S
else ifeq ($(platform), funkey) else ifeq ($(platform), funkey)
TARGET := $(TARGET_NAME)_libretro.so TARGET := $(TARGET_NAME)_libretro.so
OD_TOOLCHAIN ?= /opt/FunKey-sdk-2.0.0/ #OD_TOOLCHAIN ?= /opt/FunKey-sdk-2.0.0/
CC := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc #CC := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc
CXX := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-g++ #CXX := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-g++
LD := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc #LD := $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-gcc
AR = $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-ar #AR = $(OD_TOOLCHAIN)bin/arm-funkey-linux-musleabihf-ar
pic := -fPIC
fpic := -fPIC
SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined -fPIC SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined -fPIC
#CFLAGS += -march=armv7-a+neon-vfpv4 -mtune=cortex-a7 -mfpu=neon-vfpv4 -Ofast -fno-PIC -fdata-sections -ffunction-sections -fsingle-precision-constant -fno-common -fno-builtin -DFUNKEY
CFLAGS += -Ofast \ CFLAGS += -Ofast \
-flto=4 -fwhole-program -fuse-linker-plugin \ -flto=4 -fwhole-program -fuse-linker-plugin \
-fdata-sections -ffunction-sections -Wl,--gc-sections \ -fdata-sections -ffunction-sections -Wl,--gc-sections \
@ -415,7 +410,7 @@ else ifeq ($(platform), funkey)
-falign-functions=1 -falign-jumps=1 -falign-loops=1 \ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
-fmerge-all-constants -fno-math-errno \ -fmerge-all-constants -fno-math-errno \
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
CXXFLAGS = $(CFLAGS) -std=gnu++11 CXXFLAGS = $(CFLAGS) -std=gnu++11
CPPFLAGS += $(CFLAGS) CPPFLAGS += $(CFLAGS)
ASFLAGS += $(CFLAGS) ASFLAGS += $(CFLAGS)
@ -423,42 +418,19 @@ else ifeq ($(platform), funkey)
ARCH = arm ARCH = arm
BUILTIN_GPU = neon BUILTIN_GPU = neon
CPU_ARCH := arm CPU_ARCH := arm
HAVE_DYNAREC := 1 HAVE_DYNAREC = 1
CFLAGS += -DARM_MEMORY_DYNAREC USE_LIBCO = 0 ## IMPORTANT to be 0!
CFLAGS += -DARM -DARM_ARCH CFLAGS += -DARM -DARM_ARCH
USE_LIBCO = 0 CFLAGS += -DARM_MEMORY_DYNAREC
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
# pic := -fPIC else
# SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined -fPIC CFLAGS += -march=armv7ve
# CFLAGS += -Ofast \ # If gcc is 5.0 or later
# -flto=4 -fwhole-program -fuse-linker-plugin \ ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
# -fdata-sections -ffunction-sections -Wl,--gc-sections \ LDFLAGS += -static-libgcc -static-libstdc++
# -fno-stack-protector -fno-ident -fomit-frame-pointer \ endif
# -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ endif
# -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
# CXXFLAGS = $(CFLAGS) -std=gnu++11
# CPPFLAGS += $(CFLAGS)
# ASFLAGS += $(CFLAGS)
# HAVE_NEON = 1
# ARCH = arm
# BUILTIN_GPU = neon
# CPU_ARCH := arm
# HAVE_DYNAREC = 1
# USE_LIBCO = 0 ## IMPORTANT to be 0!
# CFLAGS += -DARM -DARM_ARCH
# CFLAGS += -DARM_MEMORY_DYNAREC
# 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
# Windows # Windows
else else

View File

@ -719,6 +719,7 @@ static void check_variables(int started_from_load)
{ {
if (started_from_load) if (started_from_load)
{ {
printf("In %s, var.value=%s\n", __func__, var.value);
if (strcmp(var.value, "disabled") == 0) if (strcmp(var.value, "disabled") == 0)
dynarec_enable = 0; dynarec_enable = 0;
else if (strcmp(var.value, "enabled") == 0) else if (strcmp(var.value, "enabled") == 0)

View File

@ -29,9 +29,11 @@ static void* retro_run_emulator(void *args)
#if defined(HAVE_DYNAREC) #if defined(HAVE_DYNAREC)
if (dynarec){ if (dynarec){
printf("DYNAREC ENABLED\n");
execute_arm_translate(cycles); execute_arm_translate(cycles);
} }
#endif #endif
printf("NO DYNAREC\n");
execute_arm(cycles); execute_arm(cycles);
emu_has_exited = true; emu_has_exited = true;