[PATCH] ARM: LLVMLinux: Change "extern inline" to "gnu_inline" in ARM ftrace.h
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Aug 14 18:45:52 EDT 2013
On Wed, Aug 14, 2013 at 05:37:41PM -0400, behanw at converseincode.com wrote:
> From: Mark Charlebois <charlebm at gmail.com>
>
> With compilers which follow the C99 standard (like modern versions of gcc and
> clang), "extern inline" does the wrong thing (emits code for an externally
> linkable version of the inline function). In this case using the gnu_inline
> attribute makes inline do the right thing on gcc and on clang.
>
> Signed-off-by: Mark Charlebois <charlebm at gmail.com>
> Signed-off-by: Behan Webster <behanw at converseincode.com>
> ---
> arch/arm/include/asm/ftrace.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
> index f89515a..fb7fdc4 100644
> --- a/arch/arm/include/asm/ftrace.h
> +++ b/arch/arm/include/asm/ftrace.h
> @@ -45,7 +45,8 @@ void *return_address(unsigned int);
>
> #else
>
> -extern inline void *return_address(unsigned int level)
> +extern inline __attribute__((gnu_inline))
> +void *return_address(unsigned int level)
Well, that should be static inline, not extern inline in any case. Does
clang work if that's static inline?
More information about the linux-arm-kernel
mailing list