[SCM] libav/experimental: FLAT objects cannot have multiple sections, so using the L1 attributes breaks linking. The FDPIC relocs also break for any other format. Thus check the compiler environment and select the appropriate sections/relocs. patch by Mike Frysinger, vapier.adi a gmail d com

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:15:07 UTC 2013


The following commit has been merged in the experimental branch:
commit d2a4ecafbba2a1a5895c6c3e2e6781f9751a681d
Author: Mike Frysinger <vapier.adi at gmail.com>
Date:   Sat Feb 16 15:17:59 2008 +0000

    FLAT objects cannot have multiple sections, so using the L1 attributes breaks
    linking. The FDPIC relocs also break for any other format. Thus check the
    compiler environment and select the appropriate sections/relocs.
    patch by Mike Frysinger, vapier.adi a gmail d com
    
    Originally committed as revision 26010 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

diff --git a/libswscale/internal_bfin.S b/libswscale/internal_bfin.S
index 475d704..2d5c61a 100644
--- a/libswscale/internal_bfin.S
+++ b/libswscale/internal_bfin.S
@@ -94,8 +94,12 @@
 
 */
 
-#define mL1 .l1.text
 #define mL3 .text
+#ifdef __FDPIC__
+#define mL1 .l1.text
+#else
+#define mL1 mL3
+#endif
 #define MEM mL1
 
 #define DEFUN(fname,where,interface) \
diff --git a/libswscale/swscale_bfin.c b/libswscale/swscale_bfin.c
index 763a005..bbc304d 100644
--- a/libswscale/swscale_bfin.c
+++ b/libswscale/swscale_bfin.c
@@ -34,14 +34,19 @@
 #include "swscale.h"
 #include "swscale_internal.h"
 
+#ifdef __FDPIC__
+#define L1CODE __attribute__ ((l1_text))
+#else
+#define L1CODE
+#endif
 
 extern int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                                long width, long height,
-                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
+                               long lumStride, long chromStride, long srcStride) L1CODE;
 
 extern int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
                                long width, long height,
-                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
+                               long lumStride, long chromStride, long srcStride) L1CODE;
 
 static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
                                 int srcSliceH, uint8_t* dst[], int dstStride[])
diff --git a/libswscale/yuv2rgb_bfin.c b/libswscale/yuv2rgb_bfin.c
index e35d49e..d277079 100644
--- a/libswscale/yuv2rgb_bfin.c
+++ b/libswscale/yuv2rgb_bfin.c
@@ -36,8 +36,11 @@
 #include "swscale.h"
 #include "swscale_internal.h"
 
-
+#ifdef __FDPIC__
 #define L1CODE __attribute__ ((l1_text))
+#else
+#define L1CODE
+#endif
 
 extern void ff_bfin_yuv2rgb555_line (uint8_t *Y, uint8_t *U, uint8_t *V, uint8_t *out,
                                      int w, uint32_t *coeffs) L1CODE;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list