+2011-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/50237
+ * internal.h (_cpp_init_lexer): New prototype.
+ * init.c (init_library): Call it.
+ * lex.c (init_vectorized_lexer): Remove constructor attribute,
+ add inline keyword.
+ (HAVE_init_vectorized_lexer): Define.
+ (_cpp_init_lexer): New function.
+
2011-12-03 Dodji Seketeli <dodji@redhat.com>
* macro.c (tokens_buff_remove_last_token)
{
initialized = 1;
+ _cpp_init_lexer ();
+
/* Set up the trigraph map. This doesn't need to do anything if
we were compiled with a compiler that supports C99 designated
initializers. */
extern void _cpp_init_tokenrun (tokenrun *, unsigned int);
extern cpp_hashnode *_cpp_lex_identifier (cpp_reader *, const char *);
extern int _cpp_remaining_tokens_num_in_context (cpp_context *);
+extern void _cpp_init_lexer (void);
/* In init.c. */
extern void _cpp_maybe_push_include_file (cpp_reader *);
typedef const uchar * (*search_line_fast_type) (const uchar *, const uchar *);
static search_line_fast_type search_line_fast;
-static void __attribute__((constructor))
+#define HAVE_init_vectorized_lexer 1
+static inline void
init_vectorized_lexer (void)
{
unsigned dummy, ecx = 0, edx = 0;
#endif
+/* Initialize the lexer if needed. */
+
+void
+_cpp_init_lexer (void)
+{
+#ifdef HAVE_init_vectorized_lexer
+ init_vectorized_lexer ();
+#endif
+}
+
/* Returns with a logical line that contains no escaped newlines or
trigraphs. This is a time-critical inner loop. */
void