* cppinit.c (BC): New macro.
(builtin_array): Add __GXX_WEAK__.
* cpplib.h (builtin_type): Add BT_WEAK.
* cppmacro.c (builtin_macro): Handle BT_WEAK.
* defaults.h (SUPPORTS_ONE_ONLY): Define.
* varasm.c (SUPPORTS_ONE_ONLY): Do not define.
From-SVN: r39436
+2001-02-04 Mark Mitchell <mark@codesourcery.com>
+
+ * cppinit.c (BC): New macro.
+ (builtin_array): Add __GXX_WEAK__.
+ * cpplib.h (builtin_type): Add BT_WEAK.
+ * cppmacro.c (builtin_macro): Handle BT_WEAK.
+ * defaults.h (SUPPORTS_ONE_ONLY): Define.
+ * varasm.c (SUPPORTS_ONE_ONLY): Do not define.
+
2001-02-03 Jakub Jelinek <jakub@redhat.com>
* cppinit.c (append_include_chain): Honor NO_IMPLICIT_EXTERN_C.
(init_spec): Use it.
* testsuite/lib/g++.exp: Include the directory where libgcc
is located to the LD_LIBRARY_PATH list.
- * inovke.texi (-shared-libgcc): Document the cases in which
+ * invoke.texi (-shared-libgcc): Document the cases in which
GCC defaults to using the shared libgcc.
2001-02-02 Alexandre Oliva <aoliva@redhat.com>
#define OPERATOR 0x10
#define B(n, t) { U n, 0, t, 0, BUILTIN, sizeof n - 1 }
+#define BC(n, t) { U n, 0, t, 0, BUILTIN | CPLUS, sizeof n - 1 }
#define C(n, v) { U n, v, 0, 0, 0, sizeof n - 1 }
#define X(n, f) { U n, 0, 0, 0, f, sizeof n - 1 }
#define O(n, c, f) { U n, 0, 0, c, OPERATOR | f, sizeof n - 1 }
B("__LINE__", BT_SPECLINE),
B("__INCLUDE_LEVEL__", BT_INCLUDE_LEVEL),
B("__STDC__", BT_STDC),
+ BC("__GXX_WEAK__", BT_WEAK),
X("__VERSION__", VERS),
X("__USER_LABEL_PREFIX__", ULP),
BT_BASE_FILE, /* `__BASE_FILE__' */
BT_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */
BT_TIME, /* `__TIME__' */
- BT_STDC /* `__STDC__' */
+ BT_STDC, /* `__STDC__' */
+ BT_WEAK /* Whether or not G++ supports weak
+ symbols. */
};
/* There is a slot in the hashnode for use by front ends when integrated
*token = node->value.builtin == BT_DATE ? pfile->date: pfile->time;
break;
+ case BT_WEAK:
+ make_number_token (pfile, token, SUPPORTS_ONE_ONLY);
+ break;
+
default:
cpp_ice (pfile, "invalid builtin macro \"%s\"", node->name);
break;
#endif
#endif
+/* This determines whether or not we support link-once semantics. */
+#ifndef SUPPORTS_ONE_ONLY
+#ifdef MAKE_DECL_ONE_ONLY
+#define SUPPORTS_ONE_ONLY 1
+#else
+#define SUPPORTS_ONE_ONLY 0
+#endif
+#endif
+
/* If the target supports weak symbols, define TARGET_ATTRIBUTE_WEAK to
provide a weak attribute. Else define it to nothing.
#endif
}
-/* This determines whether or not we support link-once semantics. */
-#ifndef SUPPORTS_ONE_ONLY
-#ifdef MAKE_DECL_ONE_ONLY
-#define SUPPORTS_ONE_ONLY 1
-#else
-#define SUPPORTS_ONE_ONLY 0
-#endif
-#endif
-
/* Returns 1 if the target configuration supports defining public symbols
so that one of them will be chosen at link time instead of generating a
multiply-defined symbol error, whether through the use of weak symbols or