From: notaz Date: Sat, 26 Oct 2024 20:12:21 +0000 (+0300) Subject: try to fix apple build X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9e5919ba0e70ff316d9eb40dffcbe34de96e58c;p=pcsx_rearmed.git try to fix apple build --- diff --git a/Makefile b/Makefile index 7f95fe4a..80186b5e 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,8 @@ LDFLAGS += -fsanitize=address 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) \ diff --git a/Makefile.libretro b/Makefile.libretro index 1b9dd715..6bacb3f4 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -201,6 +201,7 @@ else ifeq ($(platform), osx) CXXFLAGS += $(ARCHFLAGS) LDFLAGS += $(ARCHFLAGS) HAVE_PHYSICAL_CDROM = 0 + FSECTIONS_LDFLAGS = -Wl,-dead_strip # iOS else ifneq (,$(findstring ios,$(platform))) @@ -238,6 +239,7 @@ else 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 @@ -261,6 +263,7 @@ endif 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)