mstump 02/09/25 17:12:53
Modified: gcc c-common.c c-common.h
gcc/cp cp-tree.h decl2.c
Log:
Bug #: 3060416, 10.2 C++ abi compatibility for tinfo. Allows Finder_FE to build.
Reviewed by: Devang
Revision Changes Path
1.81 +21 -0 gcc3/gcc/c-common.c
Index: c-common.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/c-common.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- c-common.c 2002/09/24 02:13:50 1.80
+++ c-common.c 2002/09/26 00:12:51 1.81
@@ -588,6 +588,27 @@
int flag_enforce_eh_specs = 1;
+/* The version of the C++ ABI in use. The following values are
+ allowed:
+
+ APPLE LOCAL begin 10.2 C++ abi compat mrs
+ -2: 2.95.2 Apple uses for kernel extensions.
+
+ -1: gcc 3.1 20020420. Apple uses for gcc3 compatible 10.2.
+ APPLE LOCAL end 10.2 C++ abi compat mrs
+
+ 0: The version of the ABI believed most conformant with the
+ C++ ABI specification. This ABI may change as bugs are
+ discovered and fixed. Therefore, 0 will not necessarily
+ indicate the same ABI in different versions of G++.
+
+ 1: The version of the ABI first used in G++ 3.2.
+
+ Additional positive integers will be assigned as new versions of
+ the ABI become the default version of the ABI. */
+
+int flag_abi_version = -1;
+
/* APPLE LOCAL begin -findirect-virtual-calls 2001-10-30 sts */
/* Nonzero if all calls to virtual functions should cause indirection
through a vtable. */
1.57 +21 -0 gcc3/gcc/c-common.h
Index: c-common.h
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/c-common.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- c-common.h 2002/09/02 03:45:48 1.56
+++ c-common.h 2002/09/26 00:12:51 1.57
@@ -773,6 +773,27 @@
extern int flag_enforce_eh_specs;
+/* The version of the C++ ABI in use. The following values are
+ allowed:
+
+ APPLE LOCAL begin 10.2 C++ abi compat mrs
+ -2: 2.95.2 Apple uses for kernel extensions.
+
+ -1: gcc 3.1 20020420. Apple uses for gcc3 compatible 10.2.
+ APPLE LOCAL end 10.2 C++ abi compat mrs
+
+ 0: The version of the ABI believed most conformant with the
+ C++ ABI specification. This ABI may change as bugs are
+ discovered and fixed. Therefore, 0 will not necessarily
+ indicate the same ABI in different versions of G++.
+
+ 1: The version of the ABI first used in G++ 3.2.
+
+ Additional positive integers will be assigned as new versions of
+ the ABI become the default version of the ABI. */
+
+extern int flag_abi_version;
+
/* APPLE LOCAL begin -findirect-virtual-calls 2001-10-30 sts */
/* Nonzero if all calls to virtual functions should cause indirection
through a vtable. */
1.71 +6 -0 gcc3/gcc/cp/cp-tree.h
Index: cp-tree.h
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/cp/cp-tree.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- cp-tree.h 2002/09/19 21:03:47 1.70
+++ cp-tree.h 2002/09/26 00:12:52 1.71
@@ -212,6 +212,12 @@
#endif
+/* Returns TRUE if generated code should match ABI version N or
+ greater is in use. */
+
+#define abi_version_at_least(N) \
+ (flag_abi_version == 0 || flag_abi_version >= (N))
+
/* Language-dependent contents of an identifier. */
1.94 +5 -3 gcc3/gcc/cp/decl2.c
Index: decl2.c
===================================================================
RCS file: /cvs/Darwin/gcc3/gcc/cp/decl2.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- decl2.c 2002/09/24 05:57:37 1.93
+++ decl2.c 2002/09/26 00:12:52 1.94
@@ -2017,7 +2017,9 @@
/* If -fno-rtti, we're not necessarily emitting this stuff with
the class, so go ahead and emit it now. This can happen when
a class is used in exception handling. */
- && flag_rtti)
+ && flag_rtti
+ /* APPLE LOCAL Jaguar C++ abi compat mrs */
+ && abi_version_at_least (1))
{
DECL_NOT_REALLY_EXTERN (decl) = !CLASSTYPE_INTERFACE_ONLY (type);
DECL_COMDAT (decl) = 0;
@@ -2026,11 +2028,11 @@
{
DECL_NOT_REALLY_EXTERN (decl) = 1;
DECL_COMDAT (decl) = 1;
-#if 0 /* APPLE MERGE */
+ /* APPLE LOCAL coalescing */
#ifdef MAKE_DECL_COALESCED
+ TREE_PUBLIC (decl) = 1;
MAKE_DECL_COALESCED (decl);
#endif /* MAKE_DECL_COALESCED */
-#endif /* APPLE MERGE */
}
/* Now override some cases. */