diff options
author | Memphiz <memphis@machzwo.de> | 2012-08-03 21:21:28 +0200 |
---|---|---|
committer | Memphiz <memphis@machzwo.de> | 2012-08-03 23:44:13 +0200 |
commit | 748fb2dca3624c4c148f7ca7f55f3f66e1556316 (patch) | |
tree | e95c18cafe31c2e651b305d69f3001c0c3f08157 /lib | |
parent | 4d219752e76d42795a6edbf389b1dac0098cdbee (diff) |
[ios] - fix compilation off ffmpeg with newest Xcode build tools on mountain lion. Thx to M. Rullgard from the libav team. This still doesn't allow us to build for ios on mountain lion due to strange clangification in our darwin buildsys
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ffmpeg/libavcodec/arm/vp56_arith.h | 16 | ||||
-rw-r--r-- | lib/ffmpeg/patches/0031-ARM-vp56-allow-inline-asm-to-build-with-clang.patch | 56 |
2 files changed, 68 insertions, 4 deletions
diff --git a/lib/ffmpeg/libavcodec/arm/vp56_arith.h b/lib/ffmpeg/libavcodec/arm/vp56_arith.h index ece9ac2a6c..29a222844a 100644 --- a/lib/ffmpeg/libavcodec/arm/vp56_arith.h +++ b/lib/ffmpeg/libavcodec/arm/vp56_arith.h @@ -29,6 +29,14 @@ # define T(x) #endif +#if CONFIG_THUMB || defined __clang__ +# define L(x) +# define U(x) x +#else +# define L(x) x +# define U(x) +#endif + #if HAVE_ARMV6 && HAVE_INLINE_ASM #define vp56_rac_get_prob vp56_rac_get_prob_armv6 @@ -42,8 +50,8 @@ static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr) __asm__ ("adds %3, %3, %0 \n" "itt cs \n" "cmpcs %7, %4 \n" - A("ldrcsh %2, [%4], #2 \n") - T("ldrhcs %2, [%4], #2 \n") + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" T("itttt cs \n") @@ -80,8 +88,8 @@ static inline int vp56_rac_get_prob_branchy_armv6(VP56RangeCoder *c, int pr) __asm__ ("adds %3, %3, %0 \n" "itt cs \n" "cmpcs %7, %4 \n" - A("ldrcsh %2, [%4], #2 \n") - T("ldrhcs %2, [%4], #2 \n") + L("ldrcsh %2, [%4], #2 \n") + U("ldrhcs %2, [%4], #2 \n") "rsb %0, %6, #256 \n" "smlabb %0, %5, %6, %0 \n" T("itttt cs \n") diff --git a/lib/ffmpeg/patches/0031-ARM-vp56-allow-inline-asm-to-build-with-clang.patch b/lib/ffmpeg/patches/0031-ARM-vp56-allow-inline-asm-to-build-with-clang.patch new file mode 100644 index 0000000000..994be915e2 --- /dev/null +++ b/lib/ffmpeg/patches/0031-ARM-vp56-allow-inline-asm-to-build-with-clang.patch @@ -0,0 +1,56 @@ +#The clang integrated assembler does not support pre-UAL syntax, +#while gcc requires pre-UAL syntax for ARM code. A patch[1] for +#clang to support the old syntax as well has been ignored since +#January. +# +#This patch chooses the syntax appropriate for each compiler, +#allowing both to build the code. Notably, this change allows +#building for iphone with the latest Apple Xcode update. +# +#[1] http://llvm.org/bugs/show_bug.cgi?id=11855 +# +#Signed-off-by: Mans Rullgard <mans at mansr.com> + +diff --git a/libavcodec/arm/vp56_arith.h b/libavcodec/arm/vp56_arith.h +index ef30ffe..d1a8837 100644 +--- a/libavcodec/arm/vp56_arith.h ++++ b/libavcodec/arm/vp56_arith.h +@@ -29,6 +29,14 @@ + # define T(x) + #endif + ++#if CONFIG_THUMB || defined __clang__ ++# define L(x) ++# define U(x) x ++#else ++# define L(x) x ++# define U(x) ++#endif ++ + #if HAVE_ARMV6 && HAVE_INLINE_ASM + + #define vp56_rac_get_prob vp56_rac_get_prob_armv6 +@@ -42,8 +50,8 @@ static inline int vp56_rac_get_prob_armv6(VP56RangeCoder *c, int pr) + __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" + "cmpcs %7, %4 \n" +- A("ldrcsh %2, [%4], #2 \n") +- T("ldrhcs %2, [%4], #2 \n") ++ L("ldrcsh %2, [%4], #2 \n") ++ U("ldrhcs %2, [%4], #2 \n") + "rsb %0, %6, #256 \n" + "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") +@@ -80,8 +88,8 @@ static inline int vp56_rac_get_prob_branchy_armv6(VP56RangeCoder *c, int pr) + __asm__ ("adds %3, %3, %0 \n" + "itt cs \n" + "cmpcs %7, %4 \n" +- A("ldrcsh %2, [%4], #2 \n") +- T("ldrhcs %2, [%4], #2 \n") ++ L("ldrcsh %2, [%4], #2 \n") ++ U("ldrhcs %2, [%4], #2 \n") + "rsb %0, %6, #256 \n" + "smlabb %0, %5, %6, %0 \n" + T("itttt cs \n") +-- +1.7.11.1 |