This object file contains relocations in the text segment, when
built in ARM mode.

---
I do realize that this will end up disabling it in shared library
builds for raspberry pi, where this feature was targeted.
However, if PIC code is requested, we really should honor that. This
allows us to get rid of the last textrels.
Alternatively, are there any other ways to disable building this code
in the case where we strictly want only PIC code, not only requesting
"mostly PIC" (where it is desireable, but some textrels don't block
anything, like currently on the raspberry pi).
---
 libavcodec/arm/Makefile          | 4 +++-
 libavcodec/arm/mlpdsp_init_arm.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/arm/Makefile b/libavcodec/arm/Makefile
index 6cbb0b9..f4b50c0 100644
--- a/libavcodec/arm/Makefile
+++ b/libavcodec/arm/Makefile
@@ -56,7 +56,9 @@ ARMV5TE-OBJS-$(CONFIG_VIDEODSP)        += 
arm/videodsp_init_armv5te.o   \
                                           arm/videodsp_armv5te.o
 
 # decoders/encoders
-ARMV5TE-OBJS-$(CONFIG_MLP_DECODER)     += arm/mlpdsp_armv5te.o
+ARMV5TE-OBJS-$(CONFIG_MLP_DECODER)-$(!CONFIG_PIC)  += arm/mlpdsp_armv5te.o
+ARMV5TE-OBJS-$(CONFIG_MLP_DECODER)-$(CONFIG_THUMB) += arm/mlpdsp_armv5te.o
+ARMV5TE-OBJS-yes += $(ARMV5TE-OBJS-yes-yes)
 
 
 # ARMv6 optimizations
diff --git a/libavcodec/arm/mlpdsp_init_arm.c b/libavcodec/arm/mlpdsp_init_arm.c
index 4cdd10c..29a1a5d 100644
--- a/libavcodec/arm/mlpdsp_init_arm.c
+++ b/libavcodec/arm/mlpdsp_init_arm.c
@@ -137,7 +137,7 @@ av_cold void ff_mlpdsp_init_arm(MLPDSPContext *c)
 {
     int cpu_flags = av_get_cpu_flags();
 
-    if (have_armv5te(cpu_flags)) {
+    if (have_armv5te(cpu_flags) && (CONFIG_THUMB || !CONFIG_PIC)) {
         c->mlp_filter_channel = ff_mlp_filter_channel_arm;
         c->mlp_rematrix_channel = ff_mlp_rematrix_channel_arm;
     }
-- 
1.9.3 (Apple Git-50)

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to