fix_for_mips_with_gcc-4.5.0.patch 1012 B

12345678910111213141516171819202122232425262728293031
  1. 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.
  2. so the libmad build with gcc-4.5.0 was failing.
  3. Found a solution here:
  4. http://us.generation-nt.com/answer/bug-568418-libmad0-dev-mpg321-compilation-errors-mips-mipsel-architectures-help-169033451.html
  5. Upstream-Status: Pending
  6. 2010/07/29
  7. Nitin A Kamble <nitin.a.kamble@intel.com>
  8. --- a/fixed.h
  9. +++ b/fixed.h
  10. @@ -297,6 +297,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
  11. /* --- MIPS ---------------------------------------------------------------- */
  12. +# elif defined(FPM_MIPS) && (defined(__clang__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
  13. + typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
  14. +# define MAD_F_MLX(hi, lo, x, y) \
  15. + do { \
  16. + u64_di_t __ll = (u64_di_t) (x) * (y); \
  17. + hi = __ll >> 32; \
  18. + lo = __ll; \
  19. + } while (0)
  20. +
  21. # elif defined(FPM_MIPS)
  22. /*