Bug#726733: Fwd: [libav-devel] [PATCH] configure: enable PIC on s390(x)

Reinhard Tartler siretart at gmail.com
Sun Mar 2 07:25:47 UTC 2014


tag 726733 +patch
stop

For reference, I've used the following script to test libav:

#!/bin/sh

set -ex

if ! test -d libav
then
    git clone -b release/10 git://git.libav.org/libav.git
fi

cd libav
build_dir=`pwd`/.build.`cat RELEASE`
mkdir -p $build_dir && cd $build_dir
../configure --enable-shared --enable-gpl --prefix=`pwd`/local # --enable-pic
make -j4 all V=1
make install
export LD_LIBRARY_PATH=`pwd`/local/lib
ulimit -c unlimited
`pwd`/local/bin/avconv -codecs


---------- Forwarded message ----------
From: Reinhard Tartler <siretart at tauware.de>
Date: Sun, Mar 2, 2014 at 2:14 AM
Subject: [libav-devel] [PATCH] configure: enable PIC on s390(x)
To: libav-devel at libav.org


The s390 architecture requires shared libraries to be built in PIC mode.
Otherwise applications will get wrong relocations at run-time, leading
to confusing segmentation faults.

CC: libav-stable at libav.org
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

I've tested this patch on the debian porter box zelenka.debian.org and
can confirm that it fixes the bug described at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=726733.


diff --git a/configure b/configure
index 2f2a0f7..79e5162 100755
--- a/configure
+++ b/configure
@@ -3222,6 +3222,10 @@ case "$arch" in
         check_64bit ppc ppc64 'sizeof(void *) > 4'
         spic=$shared
     ;;
+    s390)
+        check_64bit s390 s390x 'sizeof(void *) > 4'
+        spic=$shared
+    ;;
     sparc)
         check_64bit sparc sparc64 'sizeof(void *) > 4'
         spic=$shared
--
1.8.3.2

_______________________________________________
libav-devel mailing list
libav-devel at libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


-- 
regards,
    Reinhard



More information about the pkg-multimedia-maintainers mailing list