summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-08-08 10:44:38 +0200
committerCorinna Vinschen <corinna@vinschen.de>2018-08-08 10:50:19 +0200
commit054ff18f5f7fd3baa696656949d4cad74e465cf7 (patch)
tree3149af04c64eaed6a1dc7f93f81c3eb9403556aa
parent6f485ba0261f88c1eca15bb8061ab2e6af863bbf (diff)
downloadcygnal-054ff18f5f7fd3baa696656949d4cad74e465cf7.tar.gz
cygnal-054ff18f5f7fd3baa696656949d4cad74e465cf7.tar.bz2
cygnal-054ff18f5f7fd3baa696656949d4cad74e465cf7.zip
newlib: don't use __visibility__ attrribute on Cygwin
gcc doesn't support visibility attribute on PE/COFF platforms Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--newlib/libm/common/math_config.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h
index cca682ed7..f28c52b00 100644
--- a/newlib/libm/common/math_config.h
+++ b/newlib/libm/common/math_config.h
@@ -235,17 +235,22 @@ eval_as_double (double x)
}
#ifdef __GNUC__
-# define HIDDEN __attribute__ ((__visibility__ ("hidden")))
# define NOINLINE __attribute__ ((noinline))
# define likely(x) __builtin_expect (!!(x), 1)
# define unlikely(x) __builtin_expect (x, 0)
#else
-# define HIDDEN
# define NOINLINE
# define likely(x) (x)
# define unlikely(x) (x)
#endif
+/* gcc emitting PE/COFF doesn't support visibility */
+#if defined (__GNUC__) && !defined (__CYGWIN__)
+# define HIDDEN __attribute__ ((__visibility__ ("hidden")))
+#else
+# define HIDDEN
+#endif
+
/* Error handling tail calls for special cases, with a sign argument.
The sign of the return value is set if the argument is non-zero. */