Fix test-cp-name-parser build, parser_fprintf undefined
authorPedro Alves <palves@redhat.com>
Tue, 12 Mar 2019 16:56:02 +0000 (16:56 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 12 Mar 2019 16:56:02 +0000 (16:56 +0000)
  $ make test-cp-name-parser
  ...
  test-cp-name-parser.o: In function `yy_symbol_print(_IO_FILE*, int, YYSTYPE const*, cpname_state*)':
  build/gdb/cp-name-parser.c.tmp:1335: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)'
  build/gdb/cp-name-parser.c.tmp:1339: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)'
  test-cp-name-parser.o: In function `yy_stack_print(short*, short*)':
  build/gdb/cp-name-parser.c.tmp:1350: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)'
  build/gdb/cp-name-parser.c.tmp:1354: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)'
  build/gdb/cp-name-parser.c.tmp:1356: undefined reference to `parser_fprintf(_IO_FILE*, char const*, ...)'
  build/gdb/cp-name-parser.c.tmp:1376: more undefined references to `parser_fprintf(_IO_FILE*, char const*, ...)' follow
  collect2: error: ld returned 1 exit status
  make: *** [Makefile:1833: test-cp-name-parser] Error 1

gdb/ChangeLog:
2019-03-12  Pedro Alves  <palves@redhat.com>

* yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define.

gdb/ChangeLog
gdb/yy-remap.h

index 44aa9a3b94ff63e96eafc0d42f1d3a839d369cbe..2ca2493c0e116e50f77ef7c2f44bca2272496109 100644 (file)
@@ -1,3 +1,7 @@
+2019-03-12  Pedro Alves  <palves@redhat.com>
+
+       * yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define.
+
 2019-03-12  Pedro Alves  <palves@redhat.com>
 
        * cp-name-parser.y (main): Remove unused 'len' variable.
index 579b7d2aee6a9d30ff4eb388ad9cbb5c946c9289..cdd0aae8c6e09b127a3126a64bcc544fc131cab9 100644 (file)
@@ -92,6 +92,8 @@
 # define YYDEBUG 1  /* Default to yydebug support */
 #endif
 
-#define YYFPRINTF parser_fprintf
+#ifndef TEST_CPNAMES
+# define YYFPRINTF parser_fprintf
+#endif
 
 #endif /* YY_REMAP_H */