1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
From d3685de9011e0484a0e6f11266ae0f0378aad5e6 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad@comstyle.com>
Date: Mon, 14 Jan 2013 14:44:59 +0100
Subject: [PATCH] Fix building with Clang/LLVM
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
The following diff provides some fixes for VLC to allow building
with LLVM.
Signed-off-by: Rafael Carre <funman@videolan.org>
---
include/vlc_common.h | 4 ++--
include/vlc_cpu.h | 4 ++--
modules/video_filter/deinterlace/yadif.h | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git include/vlc_common.h include/vlc_common.h
index 015a4ba..8e87a96 100644
--- include/vlc_common.h
+++ include/vlc_common.h
@@ -661,7 +661,7 @@ static inline uint16_t bswap16 (uint16_t x)
VLC_USED
static inline uint32_t bswap32 (uint32_t x)
{
-#if VLC_GCC_VERSION(4,3)
+#if VLC_GCC_VERSION(4,3) || defined(__clang__)
return __builtin_bswap32 (x);
#else
return ((x & 0x000000FF) << 24)
@@ -675,7 +675,7 @@ static inline uint32_t bswap32 (uint32_t x)
VLC_USED
static inline uint64_t bswap64 (uint64_t x)
{
-#if VLC_GCC_VERSION(4,3)
+#if VLC_GCC_VERSION(4,3) || defined(__clang__)
return __builtin_bswap64 (x);
#elif !defined (__cplusplus)
return ((x & 0x00000000000000FF) << 56)
diff --git include/vlc_cpu.h include/vlc_cpu.h
index 36f8da5..6c82004 100644
--- include/vlc_cpu.h
+++ include/vlc_cpu.h
@@ -40,7 +40,7 @@
# if defined (__MMX__)
# define VLC_MMX
-# elif VLC_GCC_VERSION(4, 4)
+# elif VLC_GCC_VERSION(4, 4) || defined(__clang__)
# define VLC_MMX __attribute__ ((__target__ ("mmx")))
# else
# define VLC_MMX VLC_MMX_is_not_implemented_on_this_compiler
@@ -48,7 +48,7 @@
# if defined (__SSE__)
# define VLC_SSE
-# elif VLC_GCC_VERSION(4, 4)
+# elif VLC_GCC_VERSION(4, 4) || defined(__clang__)
# define VLC_SSE __attribute__ ((__target__ ("sse")))
# else
# define VLC_SSE VLC_SSE_is_not_implemented_on_this_compiler
diff --git modules/video_filter/deinterlace/yadif.h modules/video_filter/deinterlace/yadif.h
index a2fccac..233504e 100644
--- modules/video_filter/deinterlace/yadif.h
+++ modules/video_filter/deinterlace/yadif.h
@@ -39,7 +39,7 @@ DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x000100010
#ifdef CAN_COMPILE_SSSE3
-#if defined(__SSE__) || VLC_GCC_VERSION(4, 4)
+#if defined(__SSE__) || VLC_GCC_VERSION(4, 4) || defined(__clang__)
// ================ SSSE3 =================
#define HAVE_YADIF_SSSE3
#define COMPILE_TEMPLATE_SSE 1
@@ -55,7 +55,7 @@ DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x000100010
#endif
#ifdef CAN_COMPILE_SSE2
-#if defined(__SSE__) || VLC_GCC_VERSION(4, 4)
+#if defined(__SSE__) || VLC_GCC_VERSION(4, 4) || defined(__clang__)
// ================= SSE2 =================
#define HAVE_YADIF_SSE2
#define COMPILE_TEMPLATE_SSE 1
@@ -69,7 +69,7 @@ DECLARE_ASM_CONST(16, const xmm_reg, pw_1) = {0x0001000100010001ULL, 0x000100010
#endif
#ifdef CAN_COMPILE_MMX
-#if defined(__MMX__) || VLC_GCC_VERSION(4, 4)
+#if defined(__MMX__) || VLC_GCC_VERSION(4, 4) || defined(__clang__)
// ================ MMX =================
#define HAVE_YADIF_MMX
#define VLC_TARGET VLC_MMX
--
1.7.10.4
From: Reinhard Tartler
Subject: Fixes mkv playback with gcc-4.4 as found in debian/squeeze
This effectively reverts this upstream commit:
http://git.videolan.org/?p=vlc/vlc-2.0.git;a=commitdiff;h=59491dcedffbf97612d2c572943b56ee4289dd07
Suggested by:
http://forum.videolan.org/viewtopic.php?f=13&t=98175&p=327945&hilit=KaxSegment#p327945
Thanks to Artyom Kazak <artyom.kazak@gmail.com> for pointing this out
Index: modules/demux/mkv/mkv.hpp
===================================================================
--- modules/demux/mkv/mkv.hpp 2012-08-10 13:14:35.284287024 +0200
+++ modules/demux/mkv/mkv.hpp 2012-08-10 13:15:13.839249260 +0200
@@ -115,7 +115,7 @@
#define MKVD_TIMECODESCALE 1000000
-#define MKV_IS_ID( el, C ) ( el != NULL && typeid( *el ) == typeid( C ) )
+#define MKV_IS_ID( el, C ) ( EbmlId( (*el) ) == C::ClassInfos.GlobalId )
using namespace LIBMATROSKA_NAMESPACE;
|