public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] newlib: don't use __visibility__ attrribute on Cygwin
Date: Wed, 08 Aug 2018 08:53:00 -0000	[thread overview]
Message-ID: <20180808085311.80508.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=054ff18f5f7fd3baa696656949d4cad74e465cf7

commit 054ff18f5f7fd3baa696656949d4cad74e465cf7
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Aug 8 10:44:38 2018 +0200

    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>

Diff:
---
 newlib/libm/common/math_config.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h
index cca682e..f28c52b 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.  */


                 reply	other threads:[~2018-08-08  8:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180808085311.80508.qmail@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).