diff options
| author | Philip Balister <philip@balister.org> | 2021-01-27 07:32:29 -0500 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@kernel.crashing.org> | 2021-01-28 11:39:08 -0600 |
| commit | d156c1739102b7167d27343bbc3610098263a456 (patch) | |
| tree | 326fc0a8724431ee4229a3c3763f066236375521 | |
| parent | d1102df68ff6e09fe91b5d6b64eee69b531a787a (diff) | |
| download | meta-xilinx-d156c1739102b7167d27343bbc3610098263a456.tar.gz | |
linux-xlnx: Fix build with patch from upstream kernel for gcc-10.
Signed-off-by: Philip Balister <philip@balister.org>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
| -rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch | 51 | ||||
| -rw-r--r-- | meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch new file mode 100644 index 00000000..d5b96c2d --- /dev/null +++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dirk Mueller <dmueller@suse.com> | ||
| 3 | Date: Tue, 14 Jan 2020 18:53:41 +0100 | ||
| 4 | Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration | ||
| 5 | |||
| 6 | gcc 10 will default to -fno-common, which causes this error at link | ||
| 7 | time: | ||
| 8 | |||
| 9 | (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here | ||
| 10 | |||
| 11 | This is because both dtc-lexer as well as dtc-parser define the same | ||
| 12 | global symbol yyloc. Before with -fcommon those were merged into one | ||
| 13 | defintion. The proper solution would be to to mark this as "extern", | ||
| 14 | however that leads to: | ||
| 15 | |||
| 16 | dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] | ||
| 17 | 26 | extern YYLTYPE yylloc; | ||
| 18 | | ^~~~~~ | ||
| 19 | In file included from dtc-lexer.l:24: | ||
| 20 | dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here | ||
| 21 | 127 | extern YYLTYPE yylloc; | ||
| 22 | | ^~~~~~ | ||
| 23 | cc1: all warnings being treated as errors | ||
| 24 | |||
| 25 | which means the declaration is completely redundant and can just be | ||
| 26 | dropped. | ||
| 27 | |||
| 28 | Signed-off-by: Dirk Mueller <dmueller@suse.com> | ||
| 29 | Signed-off-by: David Gibson <david@gibson.dropbear.id.au> | ||
| 30 | [robh: cherry-pick from upstream] | ||
| 31 | Cc: stable@vger.kernel.org | ||
| 32 | Signed-off-by: Rob Herring <robh@kernel.org> | ||
| 33 | --- | ||
| 34 | scripts/dtc/dtc-lexer.l | 1 - | ||
| 35 | 1 file changed, 1 deletion(-) | ||
| 36 | |||
| 37 | diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l | ||
| 38 | index 5c6c3fd557d7..b3b7270300de 100644 | ||
| 39 | --- a/scripts/dtc/dtc-lexer.l | ||
| 40 | +++ b/scripts/dtc/dtc-lexer.l | ||
| 41 | @@ -23,7 +23,6 @@ LINECOMMENT "//".*\n | ||
| 42 | #include "srcpos.h" | ||
| 43 | #include "dtc-parser.tab.h" | ||
| 44 | |||
| 45 | -YYLTYPE yylloc; | ||
| 46 | extern bool treesource_error; | ||
| 47 | |||
| 48 | /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ | ||
| 49 | -- | ||
| 50 | 2.29.2 | ||
| 51 | |||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb index 314b293a..44fa42de 100644 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb +++ b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.2.bb | |||
| @@ -10,5 +10,6 @@ SRC_URI_append = " \ | |||
| 10 | file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ | 10 | file://0001-perf-tests-bp_account-Make-global-variable-static.patch \ |
| 11 | file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch \ | 11 | file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch \ |
| 12 | file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ | 12 | file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \ |
| 13 | file://0001-scripts-dtc-Remove-redundant-YYLOC-global-declaratio.patch \ | ||
| 13 | " | 14 | " |
| 14 | 15 | ||
