many lack weak symbols, apple has different pthread_setname_np...
OBJS += frontend/cspace.o
ifeq "$(HAVE_NEON_ASM)" "1"
OBJS += frontend/cspace_neon.o
-frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565
+frontend/cspace.o: CFLAGS += -DHAVE_bgr555_to_rgb565 -DHAVE_bgr888_to_x
else
ifeq "$(ARCH)" "arm"
OBJS += frontend/cspace_arm.o
#endif
+#ifndef HAVE_bgr888_to_x
+
void attr_weak bgr888_to_rgb565(void *dst_, const void *src_, int bytes)
{
const unsigned char *src = src_;
void rgb888_to_rgb565(void *dst, const void *src, int bytes) {}
void bgr888_to_rgb888(void *dst, const void *src, int bytes) {}
+#endif // HAVE_bgr888_to_x
+
/* YUV stuff */
static int yuv_ry[32], yuv_gy[32], yuv_by[32];
static unsigned char yuv_u[32 * 2], yuv_v[32 * 2];
h->id = (pthread_t)ctr_thread;
#else
h = sthread_create(thread_func, NULL);
- #if defined(__GLIBC__) || defined(__MACH__) || \
+ #if defined(__GLIBC__) || \
(defined(__ANDROID_API__) && __ANDROID_API__ >= 26)
if (h && (unsigned int)type < (unsigned int)PCSXRT_COUNT)
{
# define noinline __attribute__((noinline,noclone))
# endif
# define attr_unused __attribute__((unused))
-# define attr_weak __attribute__((weak))
#else
# define likely(x) (x)
# define unlikely(x) (x)
# define noinline
# define attr_unused
+#endif
+
+// doesn't work on Android, mingw...
+#if defined(__GNUC__) && !defined(ANDROID) && !defined(__MINGW32__)
+# define attr_weak __attribute__((weak))
+#else
# define attr_weak
#endif