unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jack Howarth <howarth@bromo.med.uc.edu>
To: 15807@debbugs.gnu.org
Subject: bug#15807: guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org clang < 3.3 properly
Date: Mon, 4 Nov 2013 19:51:36 -0500	[thread overview]
Message-ID: <20131105005136.GA25087@bromo.med.uc.edu> (raw)

    The guile 2.0.9 sources incorrectly assumes that sll clang compilers support
the noreturn attribute which was only added in llvm.org clang 3.3 and Apple clang 5.0.
In fink, we have fixed this with the following patch...

--- guile-2.0.9/libguile/__scm.h.orig   2013-11-01 22:57:06.000000000 -0400
+++ guile-2.0.9/libguile/__scm.h        2013-11-01 23:07:03.000000000 -0400
@@ -76,7 +76,10 @@
  * Examples:
  *   1) int foo (char arg) SCM_NORETURN;
  */
-#ifdef __GNUC__
+
+#if (defined(__apple_build_version__) && (__clang_major__ < 5)) || ((__clang_major__ < 3) && (__clang_minor__ < 3))
+#define SCM_NORETURN
+#elif defined(__GNUC__) 
 #define SCM_NORETURN __attribute__ ((noreturn))
 #else
 #define SCM_NORETURN

Since the environmentals for __clang__, __clang_major__ and __clang_minor are common to both Apple and llvm.org
clang, the (defined(__apple_build_version__) is used to limit the first test on (__clang_major__ < 5) to Apple
clang. the second test for ((__clang_major__ < 3) && (__clang_minor__ < 3)) requires no additional restriction
since it is valid for both Apple and llvm clang in that version range. Without this patch, builds on Xcode 4.6.3,
which uses Apple clang 4.2 that lacks noreturn attribute support will fail.
          Jack





             reply	other threads:[~2013-11-05  0:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05  0:51 Jack Howarth [this message]
2013-11-05  3:00 ` bug#15807: guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org clang < 3.3 properly Mark H Weaver
2013-11-28 19:38   ` Ludovic Courtès
2014-01-15 20:12     ` Mark H Weaver

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=20131105005136.GA25087@bromo.med.uc.edu \
    --to=howarth@bromo.med.uc.edu \
    --cc=15807@debbugs.gnu.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).