libmad: fix for building on mips with gcc-4.5.0

added a patch:
 fix_for_mips_with_gcc-4.5.0.patch

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
This commit is contained in:
Nitin A Kamble 2010-07-29 15:39:32 -07:00 committed by Richard Purdie
parent 4460087b83
commit 24132e4cf1
2 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,31 @@
gcc 4.4 did this: The MIPS port no longer recognizes the h asm constraint. It was necessary to remove this constraint in order to avoid generating unpredictable code sequences.
so the libmad build with gcc-4.5.0 was failing.
Found a solution here:
http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html
2010/07/29
Nitin A Kamble <nitin.a.kamble@intel.com>
Index: libmad-0.15.1b/fixed.h
===================================================================
--- libmad-0.15.1b.orig/fixed.h
+++ libmad-0.15.1b/fixed.h
@@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
/* --- MIPS ---------------------------------------------------------------- */
+# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+ typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
+# define MAD_F_MLX(hi, lo, x, y) \
+ do { \
+ u64_di_t __ll = (u64_di_t) (x) * (y); \
+ hi = __ll >> 32; \
+ lo = __ll; \
+ } while (0)
+
# elif defined(FPM_MIPS)
/*

View File

@ -8,11 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "libid3tag"
PR = "r1"
PR = "r2"
SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libmad-${PV}.tar.gz \
file://no-force-mem.patch;patch=1 \
file://add-pkgconfig.patch;patch=1"
file://no-force-mem.patch \
file://add-pkgconfig.patch \
file://fix_for_mips_with_gcc-4.5.0.patch"
S = "${WORKDIR}/libmad-${PV}"