From f7da2a0c997cda65c435f2ad5e56db77b2524c1f Mon Sep 17 00:00:00 2001 From: Steinar Bakkemo Date: Fri, 31 Jul 2020 09:53:32 +0200 Subject: [PATCH] dtc: fix issue caused by GCC 10.x defaulting to -fno-common After changing from -fcommon which was the default in earlier gcc releases, the dtc native build failed due to multiple declarations of the form 'YYLTYPE yylloc'. Two of the declarations were removed, which fixed the problem. --- scripts/dtc/dtc-lexer.l | 1 - scripts/dtc/dtc-lexer.lex.c_shipped | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l index fd825ebba69c..24af54997758 100644 --- a/scripts/dtc/dtc-lexer.l +++ b/scripts/dtc/dtc-lexer.l @@ -38,7 +38,6 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ diff --git a/scripts/dtc/dtc-lexer.lex.c_shipped b/scripts/dtc/dtc-lexer.lex.c_shipped index 64c243772398..9db3a409c507 100644 --- a/scripts/dtc/dtc-lexer.lex.c_shipped +++ b/scripts/dtc/dtc-lexer.lex.c_shipped @@ -631,7 +631,6 @@ char *yytext; #include "srcpos.h" #include "dtc-parser.tab.h" -YYLTYPE yylloc; extern bool treesource_error; /* CAUTION: this will stop working if we ever use yyless() or yyunput() */