On Friday 23 March 2012 21:22:33 Wagner Patriota wrote:
> Has anybody done it yet?

Yes, haven't tested with the latest SDK yet but for 5.0 and below I have it 
working.

> I am using the following commands:
> 
<snip commands>
> 
> But when I try to link my application with the libraries this above
> script generates, I get the following:
> 
> "ld: warning: ignoring file
> /Users/Wagner/ffmpeg/ffmpeg/armv7/libavcodec.a, file was built for
> archive which is not the architecture being linked (armv7)"

Configure flags that I use (minus the disable/enable decoders and stuff I have 
which aren't relevant)

configure --enable-static --disable-shared --enable-pic --
sysroot="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk" 
--extra-ldflags="-arch armv7 -isysroot 
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -
miphoneos-version-min=4.0" --enable-cross-compile --arch=arm --target-
os=darwin --
cc="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --
cpu=cortex-a8 --extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-
min=4.0" --disable-debug --enable-small

I also have a small patch to work around Apple gcc brokenness, which I've 
attached.

-- 
Gavin Kinsey
AD Holdings Plc


This email and any files transmitted with it are CONFIDENTIAL and intended 
solely for the use of the individual or entity to whom they are addressed. 
Please notify the sender immediately by e-mail if you have received this e-mail 
by mistake and delete this e-mail from your system; you may not copy this 
message or disclose its contents to anyone. The recipient should check this 
email and any attachments for the presence of viruses. The Company accepts no 
liability for any damage caused by any virus transmitted by this email. Please 
note that any views or opinions presented in this email are solely those of the 
author and do not necessarily represent those of the Company. Contact Customer 
Services for details [email protected]
diff --git a/libavutil/arm/intmath.h b/libavutil/arm/intmath.h
index 52af66e..b767588 100644
--- a/libavutil/arm/intmath.h
+++ b/libavutil/arm/intmath.h
@@ -75,6 +75,8 @@ static av_always_inline av_const int16_t av_clip_int16_arm(int a)
     return x;
 }
 
+#if AV_GCC_VERSION_AT_LEAST(4,5)
+
 #define av_clip_uintp2 av_clip_uintp2_arm
 static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
 {
@@ -83,6 +85,8 @@ static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
     return x;
 }
 
+#endif /* AV_GCC_VERSION_AT_LEAST(4,5) */
+
 
 #else /* HAVE_ARMV6 */
 
@@ -97,12 +101,16 @@ static av_always_inline av_const int FASTDIV(int a, int b)
 
 #endif /* HAVE_ARMV6 */
 
+#if AV_GCC_VERSION_AT_LEAST(4,3)
+
 #define av_clipl_int32 av_clipl_int32_arm
 static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
 {
     int x, y;
     __asm__ ("adds   %1, %R2, %Q2, lsr #31  \n\t"
+#if CONFIG_THUMB
              "itet   ne                     \n\t"
+#endif
              "mvnne  %1, #1<<31             \n\t"
              "moveq  %0, %Q2                \n\t"
              "eorne  %0, %1,  %R2, asr #31  \n\t"
@@ -110,6 +118,8 @@ static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
     return x;
 }
 
+#endif /* AV_GCC_VERSION_AT_LEAST(4,3) */
+
 #endif /* HAVE_INLINE_ASM */
 
 #endif /* AVUTIL_ARM_INTMATH_H */
diff --git a/libavutil/arm/intreadwrite.h b/libavutil/arm/intreadwrite.h
index 0292aab..61aa4a5 100644
--- a/libavutil/arm/intreadwrite.h
+++ b/libavutil/arm/intreadwrite.h
@@ -52,6 +52,9 @@ static av_always_inline void AV_WN32(void *p, uint32_t v)
     __asm__ ("str  %1, %0" : "=m"(*(uint32_t *)p) : "r"(v));
 }
 
+
+#if AV_GCC_VERSION_AT_LEAST(4,4)
+
 #define AV_RN64 AV_RN64
 static av_always_inline uint64_t AV_RN64(const void *p)
 {
@@ -72,6 +75,8 @@ static av_always_inline void AV_WN64(void *p, uint64_t v)
              : "r"(v));
 }
 
+#endif /* AV_GCC_VERSION_AT_LEAST(4,4) */
+
 #endif /* HAVE_INLINE_ASM */
 
 #endif /* AVUTIL_ARM_INTREADWRITE_H */
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to