diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-06-30 23:07:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-06-30 23:07:23 +0200 |
commit | 479a3361472de1c1872927bdb2c40fec0749ad24 (patch) | |
tree | de02180766389782d6a8dd5e85f0007e53c6d22c /toolchain | |
parent | 7c9269c66cd733a373104551d803a09928029327 (diff) |
metag: fix toolchain compile
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/gcc/patches/4.2.4/fix-compile-with-newer-gcc.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/4.2.4/fix-compile-with-newer-gcc.patch b/toolchain/gcc/patches/4.2.4/fix-compile-with-newer-gcc.patch new file mode 100644 index 000000000..5cafd6c2b --- /dev/null +++ b/toolchain/gcc/patches/4.2.4/fix-compile-with-newer-gcc.patch @@ -0,0 +1,42 @@ +diff -Nur gcc-4.2.4.orig/gcc/toplev.h gcc-4.2.4/gcc/toplev.h +--- gcc-4.2.4.orig/gcc/toplev.h 2007-09-01 17:28:30.000000000 +0200 ++++ gcc-4.2.4/gcc/toplev.h 2017-06-30 22:54:25.600188422 +0200 +@@ -150,38 +150,6 @@ + /* Return true iff flags are set as if -ffast-math. */ + extern bool fast_math_flags_set_p (void); + +-/* Return log2, or -1 if not exact. */ +-extern int exact_log2 (unsigned HOST_WIDE_INT); +- +-/* Return floor of log2, with -1 for zero. */ +-extern int floor_log2 (unsigned HOST_WIDE_INT); +- +-/* Inline versions of the above for speed. */ +-#if GCC_VERSION >= 3004 +-# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG +-# define CLZ_HWI __builtin_clzl +-# define CTZ_HWI __builtin_ctzl +-# elif HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONGLONG +-# define CLZ_HWI __builtin_clzll +-# define CTZ_HWI __builtin_ctzll +-# else +-# define CLZ_HWI __builtin_clz +-# define CTZ_HWI __builtin_ctz +-# endif +- +-extern inline int +-floor_log2 (unsigned HOST_WIDE_INT x) +-{ +- return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1; +-} +- +-extern inline int +-exact_log2 (unsigned HOST_WIDE_INT x) +-{ +- return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1; +-} +-#endif /* GCC_VERSION >= 3004 */ +- + /* Functions used to get and set GCC's notion of in what directory + compilation was started. */ + |