ports/180257: [patch] devel/gdb: add USE_CSTD=gnu89 for clang
Tijl Coosemans
tijl at FreeBSD.org
Thu Jul 4 13:50:01 UTC 2013
>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:
More information about the freebsd-ports-bugs
mailing list