From: kub Date: Sat, 5 Dec 2020 14:13:53 +0000 (+0100) Subject: libretro, fix apple os builds X-Git-Tag: v2.00~651 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=512898fed140779a7f024396d948b10a4b240da2;p=picodrive.git libretro, fix apple os builds --- diff --git a/Makefile b/Makefile index 88b742ca..369de2f3 100644 --- a/Makefile +++ b/Makefile @@ -234,9 +234,13 @@ endif ifneq ($(findstring gcc,$(CC)),) ifneq ($(findstring SunOS,$(shell uname -a)),SunOS) +ifeq ($(findstring Darwin,$(shell uname -a)),Darwin) +LDFLAGS += -Wl,-map,$(TARGET).map +else LDFLAGS += -Wl,-Map=$(TARGET).map endif endif +endif target_: $(TARGET) diff --git a/Makefile.libretro b/Makefile.libretro index 040396c9..32498b34 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -81,7 +81,7 @@ else ifeq ($(platform), osx) endif OSXVER = `sw_vers -productVersion | cut -d. -f 2` OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"` - SHARED += -mmacosx-version-min=10.1 + SHARED += -mmacosx-version-min=10.6 else ifeq ($(platform), staticios) TARGET := $(TARGET_NAME)_libretro_ios.a diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 93ae3506..e49711b8 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -211,6 +211,16 @@ void cache_flush_d_inval_i(void *start, void *end) #endif } +#ifdef __MACH__ +/* calls to this may be generated by the compiler, but it's missing in libc? */ +void __clear_cache(void *start, void *end) +{ + size_t len = (char *)end - (char *)start; + sys_dcache_flush(start, len); + sys_icache_invalidate(start, len); +} +#endif + #ifdef _WIN32 /* mmap() replacement for Windows *