[x265] [PATCH] Fix mac build error when tests cmake option is enabled

radhakrishnan at multicorewareinc.com radhakrishnan at multicorewareinc.com
Wed Apr 11 15:03:48 CEST 2018


# HG changeset patch
# User Radhakrishnan <radhakrishnan at multicorewareinc.com>
# Date 1523448034 -19800
#      Wed Apr 11 17:30:34 2018 +0530
# Node ID 151627fc09e0ff7905a35f8af50e5ad4371a6c02
# Parent  e1ed4d609b52a361e758a66f45e8c070dd245211
Fix mac build error when tests cmake option is enabled

clang version 4 or higher has its own implementation of __rtdsc

diff -r e1ed4d609b52 -r 151627fc09e0 source/test/testharness.h
--- a/source/test/testharness.h	Tue Apr 03 13:49:25 2018 +0530
+++ b/source/test/testharness.h	Wed Apr 11 17:30:34 2018 +0530
@@ -72,7 +72,7 @@
 #include <x86intrin.h>
 #elif ( !defined(__APPLE__) && defined (__GNUC__) && defined(__ARM_NEON__))
 #include <arm_neon.h>
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) && (!defined(__clang__) || __clang_major__ < 4)
 /* fallback for older GCC/MinGW */
 static inline uint32_t __rdtsc(void)
 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180411/82108a94/attachment.bin>


More information about the x265-devel mailing list