This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] common: cgen-mem/cgen-ops: fix extern inline handling
- From: Michael Frysinger <vapier at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 31 Mar 2015 06:05:27 -0000
- Subject: [binutils-gdb] common: cgen-mem/cgen-ops: fix extern inline handling
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5a394431deb3745c04a74d2a109aca075f79afd6
commit 5a394431deb3745c04a74d2a109aca075f79afd6
Author: Mike Frysinger <vapier@gentoo.org>
Date: Tue Mar 31 01:58:01 2015 -0400
common: cgen-mem/cgen-ops: fix extern inline handling
With newer versions of gcc (5.x), the extern inline we're using with the
cgen-{mem,ops} modules no longer work. Since this code really wants the
gnu inline semantics, use that attribute explicitly.
Diff:
---
sim/common/ChangeLog | 5 +++++
sim/common/cgen-mem.h | 3 ++-
sim/common/cgen-ops.h | 3 ++-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 5336343..f4ca558 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-31 Mike Frysinger <vapier@gentoo.org>
+
+ * cgen-mem.h (MEMOPS_INLINE): Change to EXTERN_INLINE.
+ * cgen-ops.h (SEMOPS_INLINE): Likewise.
+
2015-03-29 Mike Frysinger <vapier@gentoo.org>
* sim-arange.h (SIM_ARANGE_INLINE): Move above sim_addr_range_hit_p.
diff --git a/sim/common/cgen-mem.h b/sim/common/cgen-mem.h
index 3245ca9..5e4d464 100644
--- a/sim/common/cgen-mem.h
+++ b/sim/common/cgen-mem.h
@@ -20,10 +20,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef CGEN_MEM_H
#define CGEN_MEM_H
+/* TODO: This should get moved into sim-inline.h. */
#ifdef MEMOPS_DEFINE_INLINE
#define MEMOPS_INLINE
#else
-#define MEMOPS_INLINE extern inline
+#define MEMOPS_INLINE EXTERN_INLINE
#endif
/* Integer memory read support.
diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h
index ef750ef..9f33d70 100644
--- a/sim/common/cgen-ops.h
+++ b/sim/common/cgen-ops.h
@@ -24,9 +24,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h>
+/* TODO: This should get moved into sim-inline.h. */
#if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
#define SEMOPS_DEFINE_INLINE
-#define SEMOPS_INLINE extern inline
+#define SEMOPS_INLINE EXTERN_INLINE
#else
#define SEMOPS_INLINE
#endif