Skip to content

Commit

Permalink
Solution for "'multiple definition of yylloc' error
Browse files Browse the repository at this point in the history
fix for
usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of 'yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

see BPI-SINOVOIP/BPI-M4-bsp#4 (comment)

edit the file ./linux-rtk/scripts/dtc/dtc-lexer-lex.c_shipped
Find the line 'YYLTYPE yylloc' and change it to 'extern YYLTYPE yylloc'
  • Loading branch information
Intronik GmbH committed Dec 11, 2023
1 parent d03feab commit c371224
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/dtc/dtc-lexer.lex.c_shipped
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ char *yytext;
#include "srcpos.h"
#include "dtc-parser.tab.h"

YYLTYPE yylloc;
extern YYLTYPE yylloc;
extern bool treesource_error;

/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
Expand Down

0 comments on commit c371224

Please sign in to comment.