[PPL-devel] [GIT] ppl/ppl(devel): Work around the fact that __attribute__((weak)) does not work on 64-bit Cygwin.

Roberto Bagnara roberto.bagnara at bugseng.com
Mon Jan 1 19:51:10 CET 2018


Module: ppl/ppl
Branch: devel
Commit: 4e3d897f08b63ac7abc55d6a3621f84cdf1a69fe
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=4e3d897f08b63ac7abc55d6a3621f84cdf1a69fe

Author: Roberto Bagnara <roberto.bagnara at bugseng.com>
Date:   Sat Apr  8 16:38:17 2017 +0200

Work around the fact that __attribute__((weak)) does not work on 64-bit Cygwin.
Thanks to Erik M. Bray.

---

 src/assertions.hh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/assertions.hh b/src/assertions.hh
index cceb7c9..63afbc1 100644
--- a/src/assertions.hh
+++ b/src/assertions.hh
@@ -98,7 +98,10 @@ site: http://bugseng.com/products/ppl/ . */
 
 namespace Parma_Polyhedra_Library {
 
-#if PPL_CXX_SUPPORTS_ATTRIBUTE_WEAK
+// Note: __attribute__((weak)) does not work on 64-bit Cygwin.
+// See https://trac.sagemath.org/ticket/16152 and links therein.
+#if PPL_CXX_SUPPORTS_ATTRIBUTE_WEAK \
+  && !(defined(__CYGWIN__) && defined(__x86_64__))
 #define PPL_WEAK_NORETURN __attribute__((weak, noreturn))
 #else
 #define PPL_WEAK_NORETURN __attribute__((noreturn))




More information about the PPL-devel mailing list