From ec148c577eaa29f26a943c13b0b66ca3877bb5aa Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 12 Mar 2019 16:56:02 +0000 Subject: [PATCH] Fix test-cp-name-parser build, parser_fprintf undefined $ 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 * yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define. --- gdb/ChangeLog | 4 ++++ gdb/yy-remap.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 44aa9a3b94f..2ca2493c0e1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2019-03-12 Pedro Alves + + * yy-remap.h [TEST_CPNAMES] (YYFPRINTF): Don't define. + 2019-03-12 Pedro Alves * cp-name-parser.y (main): Remove unused 'len' variable. diff --git a/gdb/yy-remap.h b/gdb/yy-remap.h index 579b7d2aee6..cdd0aae8c6e 100644 --- a/gdb/yy-remap.h +++ b/gdb/yy-remap.h @@ -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 */ -- 2.30.2