From dd863f1f39858bf9d3f1a9de4b4eccc8d3f75d62 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 1 Nov 2013 00:15:16 -0400 Subject: gnu: libmad: Fix MIPS assembler code to work with new GCC. * gnu/packages/patches/libmad-mips-newgcc.patch: New file. * gnu/packages/mp3.scm (libmad): Add patch. * gnu-system.am (dist_patch_DATA): Add patch. --- gnu-system.am | 1 + gnu/packages/mp3.scm | 3 ++- gnu/packages/patches/libmad-mips-newgcc.patch | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libmad-mips-newgcc.patch diff --git a/gnu-system.am b/gnu-system.am index 2d9ac98ece..fe84744767 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -240,6 +240,7 @@ dist_patch_DATA = \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libffi-mips-n32-fix.patch \ + gnu/packages/patches/libmad-mips-newgcc.patch \ gnu/packages/patches/libtheora-config-guess.patch \ gnu/packages/patches/libtool-skip-tests.patch \ gnu/packages/patches/libtool-skip-tests-for-mips.patch \ diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm index b604a36291..5f69255d2a 100644 --- a/gnu/packages/mp3.scm +++ b/gnu/packages/mp3.scm @@ -44,7 +44,8 @@ version ".tar.gz")) (sha256 (base32 - "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv")))) + "14460zhacxhswnzb36qfpd1f2wbk10qvksvm6wyq5hpvdgnw7ymv")) + (patches (list (search-patch "libmad-mips-newgcc.patch"))))) (build-system gnu-build-system) (arguments `(#:phases diff --git a/gnu/packages/patches/libmad-mips-newgcc.patch b/gnu/packages/patches/libmad-mips-newgcc.patch new file mode 100644 index 0000000000..d22c51255e --- /dev/null +++ b/gnu/packages/patches/libmad-mips-newgcc.patch @@ -0,0 +1,16 @@ +Fix MIPS assembly code to work with newer GCC, where the "=h" +constraint is no longer supported. + +--- libmad/fixed.h.orig 2004-02-16 21:02:03.000000000 -0500 ++++ libmad/fixed.h 2011-10-29 18:47:21.000000000 -0400 +@@ -304,8 +304,8 @@ + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). + */ + # define MAD_F_MLX(hi, lo, x, y) \ +- asm ("mult %2,%3" \ +- : "=l" (lo), "=h" (hi) \ ++ asm ("mult %2,%3\n\tmfhi %1" \ ++ : "=l" (lo), "=r" (hi) \ + : "%r" (x), "r" (y)) + + # if defined(HAVE_MADD_ASM) -- cgit v1.2.3