This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Wrap include/opcode/aarch64.h in extern "C" for C++
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: binutils at sourceware dot org
- Date: Wed, 7 Oct 2015 13:15:50 +0100
- Subject: [PATCH] Wrap include/opcode/aarch64.h in extern "C" for C++
- Authentication-results: sourceware.org; auth=none
This is sufficient to link an aarch64 GDB built in C++ mode. Pedro
did something similar in Feb
https://sourceware.org/ml/binutils/2015-02/msg00176.html
include/opcode/
2015-10-07 Yao Qi <yao.qi@linaro.org>
* aarch64.h [__cplusplus]: Wrap in exntern "C".
---
include/opcode/aarch64.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 79e4919..42c292e 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -27,6 +27,10 @@
#include <assert.h>
#include <stdlib.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* The offset for pc-relative addressing is currently defined to be 0. */
#define AARCH64_PCREL_OFFSET 0
@@ -964,4 +968,8 @@ aarch64_verbose (const char *, ...) __attribute__ ((format (printf, 1, 2)));
#define DEBUG_TRACE_IF(C, M, ...) ;
#endif /* DEBUG_AARCH64 */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* OPCODE_AARCH64_H */
--
1.9.1