GNU bug report logs - #15807
guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org clang < 3.3 properly

Previous Next

Package: guile;

Reported by: Jack Howarth <howarth <at> bromo.med.uc.edu>

Date: Tue, 5 Nov 2013 00:53:02 UTC

Severity: normal

Tags: moreinfo

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jack Howarth <howarth <at> bromo.med.uc.edu>
Subject: bug#15807: closed (Re: bug#15807: guile-2.0.9 doesn't handle
 Apple clang < 5 or llvm.org clang < 3.3 properly)
Date: Wed, 15 Jan 2014 20:15:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15807: guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org clang < 3.3 properly

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15807 <at> debbugs.gnu.org.

-- 
15807: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15807
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mark H Weaver <mhw <at> netris.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 15807-close <at> debbugs.gnu.org
Subject: Re: bug#15807: guile-2.0.9 doesn't handle Apple clang < 5 or llvm.org
 clang < 3.3 properly
Date: Wed, 15 Jan 2014 15:12:09 -0500
ludo <at> gnu.org (Ludovic Courtès) writes:

> Mark H Weaver <mhw <at> netris.org> skribis:
>
>> So clang is pretending to be GCC (by defining __GNUC__), and then breaks
>> if we use the noreturn attribute which has been supported in GCC since
>> version 2.5 (released in 1993) ?  If so, I consider that a bug in clang.
>
> Agreed.  As long as Clang defines __GNUC__, we should ignore any such problem.

I'm closing this bug now, since we've not heard from the original
reporter since he filed the bug, and I believe the problem is already
now fixed (by changing "noreturn" to "__noreturn__" in Guile).

     Mark

[Message part 3 (message/rfc822, inline)]
From: Jack Howarth <howarth <at> bromo.med.uc.edu>
To: bug-guile <at> gnu.org
Subject: 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
    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



This bug report was last modified 11 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.