Skip to content

Commit

Permalink
libretro: Update Makefile, fix ASAN
Browse files Browse the repository at this point in the history
  • Loading branch information
retro-wertz authored and rkitover committed Jan 13, 2019
1 parent 8628db1 commit bff08ea
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions src/libretro/Makefile
Expand Up @@ -118,6 +118,39 @@ else ifeq ($(platform), vita)
USE_MOTION_SENSOR=1
HAVE_NEON=1

# Classic Platforms ####################
# Platform affix = classic_<ISA>_<µARCH>
# Help at https://modmyclassic.com/comp

# (armv7 a7, hard point, neon based) ###
# NESC, SNESC, C64 mini
else ifeq ($(platform), classic_armv7_a7)
TARGET := $(TARGET_NAME)_libretro.so
fpic := -fPIC
SHARED := -shared
TILED_RENDERING = 1
CFLAGS += -Ofast \
-flto=4 -fwhole-program -fuse-linker-plugin \
-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
CXXFLAGS += $(CFLAGS)
HAVE_NEON = 1
ARCH = arm
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 MSVC 2017 all architectures
else ifneq (,$(findstring windows_msvc2017,$(platform)))

Expand Down Expand Up @@ -233,8 +266,9 @@ VBA_DEFINES += -DFRONTEND_SUPPORTS_RGB565
endif

ifneq ($(SANITIZER),)
CFLAGS += -fsanitize=$(SANITIZER)
LDFLAGS += -fsanitize=$(SANITIZER)
CFLAGS += -fsanitize=$(SANITIZER)
CXXFLAGS += -fsanitize=$(SANITIZER)
LDFLAGS += -fsanitize=$(SANITIZER)
endif

ifeq ($(DEBUG), 1)
Expand Down

0 comments on commit bff08ea

Please sign in to comment.