summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-02-23 14:57:44 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2010-02-23 14:57:44 +0000
commit32a44f4775a4014e6cda71a28c1b20fb75622061 (patch)
treef91d0c3754ce06683471c778d2d19c4a438ee783
parente3eb1286e10764ca4ea64b9b58ad2e8bcfe913c9 (diff)
downloadpoky-32a44f4775a4014e6cda71a28c1b20fb75622061.tar.gz
a52dec: Clean up CFLAGS
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/packages/liba52/liba52/buildcleanup.patch87
-rw-r--r--meta/packages/liba52/liba52_0.7.4.bb5
2 files changed, 90 insertions, 2 deletions
diff --git a/meta/packages/liba52/liba52/buildcleanup.patch b/meta/packages/liba52/liba52/buildcleanup.patch
new file mode 100644
index 0000000000..a86c5a8e37
--- /dev/null
+++ b/meta/packages/liba52/liba52/buildcleanup.patch
@@ -0,0 +1,87 @@
1It makes much more sense to control our own CFLAGS and avoiding fPIC breaks
2some arches too. Assume we know what we're doing and remove all the messing
3around.
4
5RP 23/2/10
6
7Index: a52dec-0.7.4/configure.in
8===================================================================
9--- a52dec-0.7.4.orig/configure.in 2010-02-23 14:51:50.000000000 +0000
10+++ a52dec-0.7.4/configure.in 2010-02-23 14:52:36.000000000 +0000
11@@ -14,62 +14,6 @@
12 AC_PROG_CC
13 AC_PROG_GCC_TRADITIONAL
14
15-if test x"$GCC" = x"yes"; then
16-
17- dnl GCC-specific flags - try to optimize them sometime
18- dnl -Wall -Werror moved to the end to not disturb the configure script
19-
20- dnl -O3
21- changequote(<<,>>)
22- OPT_CFLAGS=`echo "$CFLAGS"|sed "s/-O[0-9]*//g"`
23- changequote([,])
24- OPT_CFLAGS="$OPT_CFLAGS -O3"
25- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
26-
27- dnl -fomit-frame-pointer
28- OPT_CFLAGS="$CFLAGS -fomit-frame-pointer"
29- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS])
30-
31- dnl arch-specific flags
32- case "$host" in
33- i?86-* | k?-*)
34- case "$host" in
35- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
36- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
37- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
38- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
39- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
40- esac
41- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
42- sparc-* | sparc64-*)
43- OPT_CFLAGS="$CFLAGS -mtune=ultrasparc"
44- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
45- mips-sgi-irix6.*) dnl do we need to be that specific ?
46- OPT_CFLAGS="$CFLAGS -mabi=64"
47- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
48- esac
49-elif test x"$CC" = x"tcc" -a x"`$CC -version 2>&1 | grep TenDRA`" != x""; then
50- dnl TenDRA portability checking compiler
51- TENDRA=yes
52- CFLAGS="-Xp -Yansi -f`pwd`/include/tendra.h -DELIDE_CODE"
53- enable_mlib=no
54- enable_oss=no
55- enable_solaris_audio=no
56-elif test x"$CC" = x"icc" -a x"`$CC -V 2>&1 | grep Intel`" != x""; then
57- dnl Intel C++ compiler
58- CFLAGS="-g -O3 -unroll -ip"
59-else
60- dnl non-gcc flags - we probably need exact configuration triplets here.
61- case "$host" in
62- mips-sgi-irix6.*)
63- OPT_CFLAGS="$CFLAGS -64"
64- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
65- sparc-sun-solaris*)
66- OPT_CFLAGS="$CFLAGS -xCC -fast -xO5"
67- AC_TRY_CFLAGS([$OPT_CFLAGS],[CFLAGS=$OPT_CFLAGS]);;
68- esac
69-fi
70-
71 dnl Checks for libtool - this must be done after we set cflags
72 AC_DISABLE_SHARED
73 AC_LIBTOOL_WIN32_DLL
74Index: a52dec-0.7.4/liba52/configure.incl
75===================================================================
76--- a52dec-0.7.4.orig/liba52/configure.incl 2010-02-23 14:51:44.000000000 +0000
77+++ a52dec-0.7.4/liba52/configure.incl 2010-02-23 14:51:59.000000000 +0000
78@@ -1,9 +1,6 @@
79 AC_SUBST([LIBA52_CFLAGS])
80 AC_SUBST([LIBA52_LIBS])
81
82-dnl avoid -fPIC when possible
83-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
84-
85 AC_ARG_ENABLE([double],
86 [ --enable-double use double-precision samples])
87 if test x"$enable_double" = x"yes"; then
diff --git a/meta/packages/liba52/liba52_0.7.4.bb b/meta/packages/liba52/liba52_0.7.4.bb
index 6f987e63c6..8ed243fbcb 100644
--- a/meta/packages/liba52/liba52_0.7.4.bb
+++ b/meta/packages/liba52/liba52_0.7.4.bb
@@ -2,11 +2,12 @@ DESCRIPTION = "Library for reading some sort of media format."
2LICENSE = "GPL" 2LICENSE = "GPL"
3SECTION = "libs" 3SECTION = "libs"
4PRIORITY = "optional" 4PRIORITY = "optional"
5PR = "r1" 5PR = "r2"
6 6
7inherit autotools 7inherit autotools
8 8
9SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz" 9SRC_URI = "http://liba52.sourceforge.net/files/a52dec-${PV}.tar.gz \
10 file://buildcleanup.patch;patch=1"
10S = "${WORKDIR}/a52dec-${PV}" 11S = "${WORKDIR}/a52dec-${PV}"
11 12
12EXTRA_OECONF = " --enable-shared " 13EXTRA_OECONF = " --enable-shared "