From: notaz Date: Sun, 30 Jun 2013 22:36:38 +0000 (+0200) Subject: better workaround for ios X-Git-Tag: v1.85~71 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faf543cebe3f5e93d39f1fdb7e209ce32c954e56;hp=9aee8770d2504ed14980dc47f4683bdf080310c9;p=picodrive.git better workaround for ios --- diff --git a/Makefile.libretro b/Makefile.libretro index f6cf55c..ac9c0e9 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -128,9 +128,3 @@ PLATFORM = libretro NO_CONFIG_MAK = yes include Makefile - -# workaround another breakage on; -# Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) -ifeq ($(platform), ios) -pico/memory.o: CFLAGS += -O0 -endif diff --git a/pico/memory.c b/pico/memory.c index 0e4a624..88d43f0 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -23,6 +23,11 @@ uptr m68k_write16_map[0x1000000 >> M68K_MEM_SHIFT]; static void xmap_set(uptr *map, int shift, int start_addr, int end_addr, const void *func_or_mh, int is_func) { +#ifdef __clang__ + // workaround bug (segfault) in + // Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) + volatile +#endif uptr addr = (uptr)func_or_mh; int mask = (1 << shift) - 1; int i; @@ -110,6 +115,11 @@ static void m68k_unmapped_write16(u32 a, u32 d) void m68k_map_unmap(int start_addr, int end_addr) { +#ifdef __clang__ + // workaround bug (segfault) in + // Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) + volatile +#endif uptr addr; int shift = M68K_MEM_SHIFT; int i;