1
0

fix-compile-with-newer-gcc.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff -Nur gcc-4.2.4.orig/gcc/toplev.h gcc-4.2.4/gcc/toplev.h
  2. --- gcc-4.2.4.orig/gcc/toplev.h 2007-09-01 17:28:30.000000000 +0200
  3. +++ gcc-4.2.4/gcc/toplev.h 2017-06-30 22:54:25.600188422 +0200
  4. @@ -150,38 +150,6 @@
  5. /* Return true iff flags are set as if -ffast-math. */
  6. extern bool fast_math_flags_set_p (void);
  7. -/* Return log2, or -1 if not exact. */
  8. -extern int exact_log2 (unsigned HOST_WIDE_INT);
  9. -
  10. -/* Return floor of log2, with -1 for zero. */
  11. -extern int floor_log2 (unsigned HOST_WIDE_INT);
  12. -
  13. -/* Inline versions of the above for speed. */
  14. -#if GCC_VERSION >= 3004
  15. -# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
  16. -# define CLZ_HWI __builtin_clzl
  17. -# define CTZ_HWI __builtin_ctzl
  18. -# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG
  19. -# define CLZ_HWI __builtin_clzll
  20. -# define CTZ_HWI __builtin_ctzll
  21. -# else
  22. -# define CLZ_HWI __builtin_clz
  23. -# define CTZ_HWI __builtin_ctz
  24. -# endif
  25. -
  26. -extern inline int
  27. -floor_log2 (unsigned HOST_WIDE_INT x)
  28. -{
  29. - return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
  30. -}
  31. -
  32. -extern inline int
  33. -exact_log2 (unsigned HOST_WIDE_INT x)
  34. -{
  35. - return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
  36. -}
  37. -#endif /* GCC_VERSION >= 3004 */
  38. -
  39. /* Functions used to get and set GCC's notion of in what directory
  40. compilation was started. */