[oe-commits] Paul Menzel : liba52: Disable `-prefer-non-pic` to enable `-fPIC`.

git version control git at git.openembedded.org
Tue Mar 16 08:17:00 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: f92b2201ab4974bc1e2fed1b6ee9906774baf928
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f92b2201ab4974bc1e2fed1b6ee9906774baf928

Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Mon Mar 15 04:55:56 2010 +0000

liba52: Disable `-prefer-non-pic` to enable `-fPIC`.

Using GCC 4.4.2 and Binutils 2.20 gives the following error.

    …/bin/ld: .libs/imdct.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Therefore enable `-fPIC` with this patch taken from Debian [1].

[1] http://patch-tracker.debian.org/patch/series/view/a52dec/0.7.4-13/01-enable-pic.diff

Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
Signed-off-by: Philip Balister <philip at balister.org>

---

 recipes/liba52/files/01-enable-pic.diff |   23 +++++++++++++++++++++++
 recipes/liba52/liba52_0.7.4.bb          |    5 +++--
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/recipes/liba52/files/01-enable-pic.diff b/recipes/liba52/files/01-enable-pic.diff
new file mode 100644
index 0000000..ed1accd
--- /dev/null
+++ b/recipes/liba52/files/01-enable-pic.diff
@@ -0,0 +1,23 @@
+Description: Disabling -prefer-non-pic which enables -fPIC
+Bug-Debian: http://bugs.debian.org/401590
+Author: Daniel Baumann <daniel at debian.org>, Dmitrijs Ledkovs <dmitrij.ledkov at gmail.com>
+
+
+---
+ liba52/configure.incl |    3 ---
+ 1 files changed, 0 insertions(+), 3 deletions(-)
+
+Index: a52dec-deb/liba52/configure.incl
+===================================================================
+--- a52dec-deb.orig/liba52/configure.incl	2009-12-05 02:52:12.000000000 +0000
++++ a52dec-deb/liba52/configure.incl	2009-12-05 03:23:45.000000000 +0000
+@@ -1,9 +1,6 @@
+ AC_SUBST([LIBA52_CFLAGS])
+ AC_SUBST([LIBA52_LIBS])
+ 
+-dnl avoid -fPIC when possible
+-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+-
+ AC_ARG_ENABLE([double],
+     [  --enable-double         use double-precision samples])
+ if test x"$enable_double" = x"yes"; then
diff --git a/recipes/liba52/liba52_0.7.4.bb b/recipes/liba52/liba52_0.7.4.bb
index 743fa30..ea87cbe 100644
--- a/recipes/liba52/liba52_0.7.4.bb
+++ b/recipes/liba52/liba52_0.7.4.bb
@@ -2,11 +2,12 @@ DESCRIPTION = "Library for reading some sort of media format."
 LICENSE = "GPL"
 SECTION = "libs"
 PRIORITY = "optional"
-PR = "r1"
+PR = "r2"
 
 inherit autotools
 
-SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz"
+SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \
+           file://01-enable-pic.diff;patch=1"
 S = "${WORKDIR}/a52dec-${PV}"
 
 EXTRA_OECONF = " --enable-shared "





More information about the Openembedded-commits mailing list