retroarch: remove gcc-specific fix on powerpc because __mftb() is no
more available. Also backport an upstream commit so all archs use clock_gettime(2) to get ticks, instead of architecture/implementation dependent code. This fixes the build on powerpc. OK bentley@ (maintainer) and jca@
This commit is contained in:
parent
7c4898afbd
commit
8d578968e8
@ -1,11 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2019/07/12 20:46:09 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2020/04/29 14:12:08 cwen Exp $
|
||||
|
||||
COMMENT = generic multi-emulator frontend
|
||||
|
||||
V = 1.7.6
|
||||
DISTNAME = RetroArch-$V
|
||||
PKGNAME = retroarch-$V
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
|
||||
CATEGORIES = emulators
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-libretro-common_features_features_cpu_c,v 1.2 2020/04/12 04:34:19 bentley Exp $
|
||||
$OpenBSD: patch-libretro-common_features_features_cpu_c,v 1.3 2020/04/29 14:12:08 cwen Exp $
|
||||
|
||||
ppc fix for:
|
||||
features_cpu.c:(.text+0x20): undefined reference to `__mftb'
|
||||
Ensure that the undefined __mtfb() primitive is not used on powerpc, from:
|
||||
https://github.com/libretro/RetroArch/pull/10383
|
||||
|
||||
Index: libretro-common/features/features_cpu.c
|
||||
--- libretro-common/features/features_cpu.c.orig
|
||||
@ -14,12 +14,12 @@ Index: libretro-common/features/features_cpu.c
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <direct.h>
|
||||
@@ -39,7 +40,7 @@
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
-#if defined(__CELLOS_LV2__)
|
||||
+#if defined(__CELLOS_LV2__) || ( defined(__OpenBSD__) && defined(__powerpc__) )
|
||||
#ifndef _PPU_INTRINSICS_H
|
||||
#include <ppu_intrinsics.h>
|
||||
#endif
|
||||
@@ -166,7 +167,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
|
||||
tv_sec = (long)((ularge.QuadPart - epoch) / 10000000L);
|
||||
tv_usec = (long)(system_time.wMilliseconds * 1000);
|
||||
time_ticks = (1000000 * tv_sec + tv_usec);
|
||||
-#elif defined(__linux__) || defined(__QNX__) || defined(__MACH__)
|
||||
+#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(__MACH__)
|
||||
struct timespec tv = {0};
|
||||
if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) == 0)
|
||||
time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 +
|
||||
|
Loading…
Reference in New Issue
Block a user