endif
ifneq ($(NO_FSECTIONS), 1)
CFLAGS += -ffunction-sections -fdata-sections
-LDFLAGS += -Wl,--gc-sections
+FSECTIONS_LDFLAGS ?= -Wl,--gc-sections
+LDFLAGS += $(FSECTIONS_LDFLAGS)
endif
CFLAGS += -DP_HAVE_MMAP=$(if $(NO_MMAP),0,1) \
-DP_HAVE_PTHREAD=$(if $(NO_PTHREAD),0,1) \
CXXFLAGS += $(ARCHFLAGS)
LDFLAGS += $(ARCHFLAGS)
HAVE_PHYSICAL_CDROM = 0
+ FSECTIONS_LDFLAGS = -Wl,-dead_strip
# iOS
else ifneq (,$(findstring ios,$(platform)))
MINVERSION = -miphoneos-version-min=5.0
endif
CFLAGS += $(MINVERSION)
+ FSECTIONS_LDFLAGS = -Wl,-dead_strip
else ifeq ($(platform), tvos-arm64)
TARGET := $(TARGET_NAME)_libretro_tvos.dylib
CC_AS = perl ./tools/gas-preprocessor.pl $(CC)
MINVERSION = -mappletvos-version-min=11.0
CFLAGS += $(MINVERSION)
+ FSECTIONS_LDFLAGS = -Wl,-dead_strip
# Nintendo Switch (libnx)
else ifeq ($(platform), libnx)