mirror of
https://github.com/pmmp/musl-cross-make.git
synced 2025-02-24 09:35:00 +00:00
patch set consists of: 0001 full musl libc target support 0002 fixes for wrong optimizations of weak defs/aliases 0003 various sh breakage in configure scripts 0005 static pie support 0006 --enable-default-pie support 0008 fix for cross compiling bug in build system 0009 fix for wrong default div strategy for sh2 (missing libgcc code) 0010 fix failure to build on modern host gcc due to gnu-inline 0011 fix sh & alpha bootstrap failures before libc is built 0012 fix broken local-exec TLS with -fPIE on sh
54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
diff --git a/gcc/toplev.c b/gcc/toplev.c
|
|
index 53fcdfe..85f8504 100644
|
|
--- a/gcc/toplev.c
|
|
+++ b/gcc/toplev.c
|
|
@@ -533,6 +533,7 @@ read_integral_parameter (const char *p, const char *pname, const int defval)
|
|
|
|
#if GCC_VERSION < 3004 || !defined (__cplusplus)
|
|
|
|
+#if 0
|
|
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
|
|
If X is 0, return -1. */
|
|
|
|
@@ -582,6 +583,7 @@ exact_log2 (unsigned HOST_WIDE_INT x)
|
|
return floor_log2 (x);
|
|
#endif
|
|
}
|
|
+#endif
|
|
|
|
#endif /* GCC_VERSION < 3004 || !defined (__cplusplus) */
|
|
|
|
diff --git a/gcc/toplev.h b/gcc/toplev.h
|
|
index c935f7e..c8d4bb2 100644
|
|
--- a/gcc/toplev.h
|
|
+++ b/gcc/toplev.h
|
|
@@ -152,10 +152,10 @@ extern void decode_d_option (const char *);
|
|
extern bool fast_math_flags_set_p (void);
|
|
|
|
/* Return log2, or -1 if not exact. */
|
|
-extern int exact_log2 (unsigned HOST_WIDE_INT);
|
|
+//extern int exact_log2 (unsigned HOST_WIDE_INT);
|
|
|
|
/* Return floor of log2, with -1 for zero. */
|
|
-extern int floor_log2 (unsigned HOST_WIDE_INT);
|
|
+//extern int floor_log2 (unsigned HOST_WIDE_INT);
|
|
|
|
/* Inline versions of the above for speed. */
|
|
#if GCC_VERSION >= 3004
|
|
@@ -170,13 +170,13 @@ extern int floor_log2 (unsigned HOST_WIDE_INT);
|
|
# define CTZ_HWI __builtin_ctz
|
|
# endif
|
|
|
|
-extern inline int
|
|
+static 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
|
|
+static inline int
|
|
exact_log2 (unsigned HOST_WIDE_INT x)
|
|
{
|
|
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
|