[K42-discussion] [PATCH] GCC3 and GCC4 have different symbol generation strategies for functions defined as extern 'C' inside C++. This provides simple macro that solves the problem of linking on both GCC3 and GCC4 with the same code.
Donour Sizemore
donour at cs.unm.edu
Sat Jan 13 07:02:09 EST 2007
Signed-off-by: donour at cs.unm.edu <donour at cs.unm.edu>
---
lib/libc/misc/arch/powerpc/asm.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/lib/libc/misc/arch/powerpc/asm.h
b/lib/libc/misc/arch/powerpc/asm.h
index 9e81dd9..cc7ef79 100644
--- a/lib/libc/misc/arch/powerpc/asm.h
+++ b/lib/libc/misc/arch/powerpc/asm.h
@@ -33,6 +33,16 @@ #define CODE(x) x
#define C_TEXT(x) . ## x
#define C_DATA(x) x
+#define CXX_EXTC_TEXT(x) C_TEXT(x)
+#if __GNUC__ >= 4
+#undef CXX_EXTC_TEXT
+#define CXX_EXTC_TEXT(x) x
+#endif
+
+
+
+
+
#define CODE_LABEL(x) GLBL_LABEL(CODE(x))
#define C_TEXT_LABEL(x) GLBL_LABEL(C_TEXT(x))
#define C_DATA_LABEL(x) GLBL_LABEL(C_DATA(x))
--
1.4.1.1
More information about the K42-discussion
mailing list