diff --git a/device/testing/linux-xiaomi-tissot/APKBUILD b/device/testing/linux-xiaomi-tissot/APKBUILD index d0e2e1cf1..b8dd01f63 100644 --- a/device/testing/linux-xiaomi-tissot/APKBUILD +++ b/device/testing/linux-xiaomi-tissot/APKBUILD @@ -29,6 +29,7 @@ source=" 0007-narrow-down-trace-include-paths.patch 0008-Add-config-option-to-fix-bootloader-cmdline-args.patch fix-xorg-mdss-update-fb-info.patch + gcc10-scripts-dtc-yylloc.patch " builddir="$srcdir/$_repository-$_commit" _outdir="out" @@ -58,4 +59,5 @@ d2da0e6d6945e7396d2cb7e30e64806be2473f0fb67e0117a0b9dc5204a105873828bd8d0c6cfbec 34d588925668b730aad131ec6b899d0f06538fffeb4a913ed0d1765e2caea417a8711a98c4a06bb100e98c0dd3ab43b762dc3a36a288b664af337ff1803eeeb6 0006-narrow-down-include-path-for-msm_camera.patch 0ee10f54d0a66d4ee4b32599847e977262a3d906093efd34216b91aa12b9f7b46bcd28fffa8b054931eb77c82496d474eee9c5d28c59fc33f8903e6c536189e2 0007-narrow-down-trace-include-paths.patch cf5c7f3df4bb62617f0d6e3ece29fe2f316fd8d6d38ca352706cb207947ded2bfe7a6b65f9480843204610d6dffe52e6b11df24d3d0cae7812de56bc41081b20 0008-Add-config-option-to-fix-bootloader-cmdline-args.patch -4f73a06557207733707ca08c9991e04734e56386f3ce8e9cc5b640f4b47e1ae607ae3ea14a7003cb98a04f9df943e22c1baf316d520724237533c2c337cc56f2 fix-xorg-mdss-update-fb-info.patch" +4f73a06557207733707ca08c9991e04734e56386f3ce8e9cc5b640f4b47e1ae607ae3ea14a7003cb98a04f9df943e22c1baf316d520724237533c2c337cc56f2 fix-xorg-mdss-update-fb-info.patch +eaf2e61fcb508cdd239b8fed209d2a09ecac77287f6b46d003918fdf1c6fa2ee63f7390f3ff7c49029b8ed6cbcdd81c7e9a4b1ece9f5060b6fc84e322bd47f41 gcc10-scripts-dtc-yylloc.patch" diff --git a/device/testing/linux-xiaomi-tissot/gcc10-scripts-dtc-yylloc.patch b/device/testing/linux-xiaomi-tissot/gcc10-scripts-dtc-yylloc.patch new file mode 100644 index 000000000..26546ca3d --- /dev/null +++ b/device/testing/linux-xiaomi-tissot/gcc10-scripts-dtc-yylloc.patch @@ -0,0 +1,64 @@ +From 4c2e46a9ec9ec477346d9145fdeba8413ae5c515 Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Tue, 14 Jan 2020 18:53:41 +0100 +Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration + +gcc 10 will default to -fno-common, which causes this error at link +time: + + (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here + +This is because both dtc-lexer as well as dtc-parser define the same +global symbol yyloc. Before with -fcommon those were merged into one +defintion. The proper solution would be to to mark this as "extern", +however that leads to: + + dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] + 26 | extern YYLTYPE yylloc; + | ^~~~~~ +In file included from dtc-lexer.l:24: +dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here + 127 | extern YYLTYPE yylloc; + | ^~~~~~ +cc1: all warnings being treated as errors + +which means the declaration is completely redundant and can just be +dropped. + +Signed-off-by: Dirk Mueller +Signed-off-by: David Gibson +[robh: cherry-pick from upstream] +Cc: stable@vger.kernel.org +Signed-off-by: Rob Herring +--- + 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 790fbf6cf2d7..e4e0f6a8d07b 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 ba525c2f9fc2..750f7a4e3ece 100644 +--- a/scripts/dtc/dtc-lexer.lex.c_shipped ++++ b/scripts/dtc/dtc-lexer.lex.c_shipped +@@ -637,7 +637,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() */ +-- +2.28.0 +