aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--dtc-parser.y4
2 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e955242..4d88157 100644
--- a/Makefile
+++ b/Makefile
@@ -368,6 +368,6 @@ clean: libfdt_clean pylibfdt_clean tests_clean
%.tab.c %.tab.h %.output: %.y
@$(VECHO) BISON $@
- $(BISON) -d $<
+ $(BISON) -b $(basename $(basename $@)) -d $<
FORCE:
diff --git a/dtc-parser.y b/dtc-parser.y
index 2ed4dc1..40dcf4f 100644
--- a/dtc-parser.y
+++ b/dtc-parser.y
@@ -2,6 +2,8 @@
/*
* (C) Copyright David Gibson <dwg@au1.ibm.com>, IBM Corporation. 2005.
*/
+%locations
+
%{
#include <stdio.h>
#include <inttypes.h>
@@ -17,6 +19,8 @@ extern void yyerror(char const *s);
treesource_error = true; \
} while (0)
+#define YYERROR_CALL(msg) yyerror(msg)
+
extern struct dt_info *parser_output;
extern bool treesource_error;
%}