summaryrefslogtreecommitdiff
path: root/toolchain/gcc/patches/4.4.7/fix-compile-with-newer-gcc.patch
blob: be2603c051170b0328e20296baf4b4c4c411ecf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff -Nur gcc-4.4.7.orig/gcc/toplev.h gcc-4.4.7/gcc/toplev.h
--- gcc-4.4.7.orig/gcc/toplev.h	2009-02-20 16:20:38.000000000 +0100
+++ gcc-4.4.7/gcc/toplev.h	2017-06-30 21:00:00.981033517 +0200
@@ -167,38 +167,6 @@
 extern bool fast_math_flags_set_p	(void);
 extern bool fast_math_flags_struct_set_p (struct cl_optimization *);
 
-/* 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.  */