From b83120df7923eb572ab6d88505f234b6784a2b6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Beh=C3=BAn?= Date: Thu, 20 May 2021 13:24:12 +0200 Subject: [PATCH] ARM: fix LTO for imx28_xea MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When imx28_xea_defconfig is built with LTO, the compiler complains about the two different declarations of _start: include/asm-generic/sections.h as extern void _start(void); arch/arm/cpu/arm926ejs/mxs/mxs.c as extern uint32_t _start; Fix this. Signed-off-by: Marek Behún Reviewed-by: Bin Meng --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 2 +- arch/arm/cpu/arm926ejs/mxs/spl_boot.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index 344b9b4e55..4d21e3df76 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -25,6 +25,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; @@ -98,7 +99,6 @@ int arch_cpu_init(void) { struct mxs_clkctrl_regs *clkctrl_regs = (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; - extern uint32_t _start; mx28_fixup_vt((uint32_t)&_start); diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c index 66406cc857..0a8985b90a 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "mxs_init.h" @@ -100,7 +101,6 @@ static void mxs_spl_fixup_vectors(void) * thus this fixup. Our vectoring table is PIC, so copying is * fine. */ - extern uint32_t _start; /* cppcheck-suppress nullPointer */ memcpy(0x0, &_start, 0x60); -- 2.39.5