Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Jul 2013 15:44:26 +0200 (CEST)
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/180257: [patch] devel/gdb: add USE_CSTD=gnu89 for clang
Message-ID:  <201307041344.r64DiQH0006480@kalimero.tijl.coosemans.org>
Resent-Message-ID: <201307041350.r64Do0Iq063686@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         180257
>Category:       ports
>Synopsis:       [patch] devel/gdb: add USE_CSTD=gnu89 for clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 04 13:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tijl Coosemans
>Release:        FreeBSD 10.0-CURRENT i386
>Organization:
>Environment:
>Description:
Problems with inline and clang are because clang defaults to C99.
By adding USE_CSTD=gnu89 patch-include-cgen-basic-ops.h can be removed.
>How-To-Repeat:
>Fix:

--- gdb.patch begins here ---
Index: devel/gdb/Makefile
===================================================================
--- devel/gdb/Makefile	(revision 322214)
+++ devel/gdb/Makefile	(working copy)
@@ -13,6 +13,7 @@ COMMENT=	GNU GDB of newer version than c
 LICENSE=	GPLv3
 
 USE_BZIP2=	yes
+USE_CSTD=	gnu89
 USE_GMAKE=	yes
 USES=		iconv
 GNU_CONFIGURE=	yes
Index: devel/gdb/files/patch-include-cgen-basic-ops.h
===================================================================
--- devel/gdb/files/patch-include-cgen-basic-ops.h	(revision 322214)
+++ devel/gdb/files/patch-include-cgen-basic-ops.h	(working copy)
@@ -1,43 +0,0 @@
---- include/cgen/basic-ops.h.orig	2013-03-07 17:31:21.000000000 +0100
-+++ include/cgen/basic-ops.h	2013-03-07 17:31:28.000000000 +0100
-@@ -24,11 +24,16 @@
- 
- #include <assert.h>
- 
--#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
-+#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE) && ! defined (__clang__)
- #define SEMOPS_DEFINE_INLINE
- #define SEMOPS_INLINE extern inline
- #else
--#define SEMOPS_INLINE
-+# if defined (__clang__) && ! defined (SEMOPS_DEFINE_INLINE)
-+#  define SEMOPS_DEFINE_INLINE
-+#  define SEMOPS_INLINE static inline
-+# else
-+#  define SEMOPS_INLINE
-+# endif
- #endif
- 
- /* These don't really have a mode.  */
-@@ -295,11 +300,16 @@
-    significant and word number 0 is the most significant word.
-    ??? May also wish an endian-dependent version.  Later.  */
- 
--QI SUBWORDSIQI (SI, int);
--HI SUBWORDSIHI (SI, int);
--QI SUBWORDDIQI (DI, int);
--HI SUBWORDDIHI (DI, int);
--SI SUBWORDDISI (DI, int);
-+#if defined (__clang__) && defined (SEMOPS_DEFINE_INLINE)
-+#define SEMOPS_STATIC static
-+#else
-+#define SEMOPS_STATIC
-+#endif
-+SEMOPS_STATIC QI SUBWORDSIQI (SI, int);
-+SEMOPS_STATIC HI SUBWORDSIHI (SI, int);
-+SEMOPS_STATIC QI SUBWORDDIQI (DI, int);
-+SEMOPS_STATIC HI SUBWORDDIHI (DI, int);
-+SEMOPS_STATIC SI SUBWORDDISI (DI, int);
- 
- #ifdef SEMOPS_DEFINE_INLINE
- 
--- gdb.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307041344.r64DiQH0006480>