This commit is contained in:
mahoneyt944 2021-01-06 06:56:03 -05:00 committed by GitHub
parent 5664ae652c
commit a5783ee172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -665,10 +665,10 @@ else ifneq (,$(findstring windows_msvc2017,$(platform)))
# Windows # Windows
else else
TARGET := $(TARGET_NAME)_libretro.dll TARGET := $(TARGET_NAME)_libretro.dll
CC ?= gcc CC ?= gcc
LDFLAGS += -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T LDFLAGS += -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T
CFLAGS += -D__WIN32__ CFLAGS += -D__WIN32__
endif endif
# Architecture-specific flags ############################# # Architecture-specific flags #############################
@ -684,7 +684,7 @@ endif
# explictly use -fsigned-char on all platforms to solve problems with code written/tested on x86 but used on ARM # explictly use -fsigned-char on all platforms to solve problems with code written/tested on x86 but used on ARM
# for example, audio on rtype leo is wrong on ARM without this flag # for example, audio on rtype leo is wrong on ARM without this flag
ifeq (,$(findstring msvc,$(platform))) ifeq (,$(findstring msvc,$(platform)))
CFLAGS += -fsigned-char CFLAGS += -fsigned-char
endif endif
# Use position-independent code for all platforms # Use position-independent code for all platforms
@ -696,26 +696,26 @@ RETRO_PROFILE = 0
CFLAGS += -DRETRO_PROFILE=$(RETRO_PROFILE) CFLAGS += -DRETRO_PROFILE=$(RETRO_PROFILE)
ifneq ($(platform), sncps3) ifneq ($(platform), sncps3)
ifeq (,$(findstring msvc,$(platform))) ifeq (,$(findstring msvc,$(platform)))
CFLAGS += -Wall -Wunused \ CFLAGS += -Wall -Wunused \
-Wpointer-arith -Wbad-function-cast -Wcast-align -Waggregate-return \ -Wpointer-arith -Wbad-function-cast -Wcast-align -Waggregate-return \
-Wshadow -Wstrict-prototypes \ -Wshadow -Wstrict-prototypes \
-Wformat-security -Wwrite-strings \ -Wformat-security -Wwrite-strings \
-Wdisabled-optimization -Wdisabled-optimization
endif endif
endif endif
ifeq (,$(findstring msvc,$(platform))) ifeq (,$(findstring msvc,$(platform)))
CFLAGS += -D_XOPEN_SOURCE=500 -fomit-frame-pointer -fstrict-aliasing CFLAGS += -D_XOPEN_SOURCE=500 -fomit-frame-pointer -fstrict-aliasing
endif endif
# End of compiler flags for all platforms ###################### # End of compiler flags for all platforms ######################
# Disable optimization when debugging ##################### # Disable optimization when debugging #####################
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g3 CFLAGS += -O0 -g3
else else
CFLAGS += -O2 -DNDEBUG CFLAGS += -O2 -DNDEBUG
endif endif
# include the various .mak files # include the various .mak files