From 87c4294f606a992e01dea8f2a1377edf3ad32317 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Krause?= Date: Wed, 5 Aug 2015 17:06:38 +0200 Subject: [PATCH] arm: mxs: make inline function compatible for GCC 5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit GCC 5 uses C99 inline semantics. To generate external visibility in C99 for the lowlevel_init() function must be declared with extern inline [1]. The GNU89 inline semantic is the same as C99 extern inline. Use the __GNUC_STDC_INLINE__ macro to detect if C99 inline semantic will be used by GCC. Fixes the build error "undefined reference to `lowlevel_init'" for mx28 based targets. [1] "Different semantics for inline functions" https://gcc.gnu.org/gcc-5/porting_to.html Signed-off-by: Jörg Krause Signed-off-by: Otavio Salvador --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index ef130aea42..439396b26a 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -24,6 +24,9 @@ DECLARE_GLOBAL_DATA_PTR; /* Lowlevel init isn't used on i.MX28, so just have a dummy here */ +#if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x default */ +extern +#endif inline void lowlevel_init(void) {} void reset_cpu(ulong ignored) __attribute__((noreturn)); -- 2.40.1