常見錯誤:YYLTYPE yylloc;
usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of 'yylloc'; scripts/dtc/dtc-lexer.lex.o:
Fast fix:
#include "srcpos.h"
#include "dtc-parser.tab.h"
extern YYLTYPE yylloc; // OLD CODE: YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
#define YY_USER_ACTION \
我受夠了百度這辣雞玩意了,最近用 manjaro gcc10 編譯 rk 系列芯片經常出現這個問題,主要還是因為 gcc 太新了。