Build error gcc 10.x (SOLVED, PLS FIX ON REPO) multiple definition of 'yylloc'
作者:互联网
常见错误: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 \
我受够了百度这辣鸡玩意了,最近用 majaro gcc10 编译 rk 系列芯片经常出现这个问题,主要还是因为 gcc 太新了。
标签:10,gcc,PLS,dtc,parser,tab,extern,YYLTYPE,yylloc 来源: https://www.cnblogs.com/juwan/p/14350954.html