[meta-freescale] [meta-fsl-arm][PATCH] linux-ls1: Patches to fix gcc 5.2 build issues

Daiane Angolini daiane.list at gmail.com
Fri Oct 9 05:36:56 PDT 2015


On Fri, Oct 9, 2015 at 2:48 AM,  <b40290 at freescale.com> wrote:
> From: Chunrong Guo <B40290 at freescale.com>
>
> Cherry picked patches from future kernel versions to fix gcc5.2
> build errors
>
> Signed-off-by: Chunrong Guo <B40290 at freescale.com>
> Signed-off-by: Chunrong Guo <B40290 at freescale.com>
Are it a duplication mistake or are you willing to point someone else
and forgot?


I appreciate to see some tested-by or acked-by from people having
problem with this kernel

Daiane

> ---
>  recipes-kernel/linux/linux-ls1.inc                 |  6 +++
>  ...LLVMLinux-use-static-inline-in-ARM-ftrace.patch | 48 ++++++++++++++++++
>  ...nux-Change-extern-inline-to-static-inline.patch | 59 ++++++++++++++++++++++
>  .../0003-use-static-inline-in-ARM-lifeboot.h.patch | 53 +++++++++++++++++++
>  4 files changed, 166 insertions(+)
>  create mode 100644 recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
>  create mode 100644 recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
>  create mode 100644 recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
>
> diff --git a/recipes-kernel/linux/linux-ls1.inc b/recipes-kernel/linux/linux-ls1.inc
> index 08d88f4..971c6de 100644
> --- a/recipes-kernel/linux/linux-ls1.inc
> +++ b/recipes-kernel/linux/linux-ls1.inc
> @@ -8,6 +8,12 @@ SRC_URI = "git://git.freescale.com/ppc/sdk/linux.git;branch=${SRCBRANCH} \
>      file://defconfig \
>  "
>
> +SRC_URI += " \
> +    file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
> +    file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \
> +    file://0003-use-static-inline-in-ARM-lifeboot.h.patch \
> +"
> +
>  KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
>  ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
>
> diff --git a/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
> new file mode 100644
> index 0000000..47f13c7
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
> @@ -0,0 +1,48 @@
> +From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
> +From: Behan Webster <behanw at converseincode.com>
> +Date: Wed, 24 Sep 2014 01:06:46 +0100
> +Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
> +
> +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 static inline
> +and removing the NULL version of return_address in return_address.c does
> +the right thing.
> +
> +Signed-off-by: Behan Webster <behanw at converseincode.com>
> +Reviewed-by: Mark Charlebois <charlebm at gmail.com>
> +Acked-by: Steven Rostedt <rostedt at goodmis.org>
> +Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
> +
> +diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
> +index 39eb16b..bfe2a2f 100644
> +--- a/arch/arm/include/asm/ftrace.h
> ++++ b/arch/arm/include/asm/ftrace.h
> +@@ -45,7 +45,7 @@ void *return_address(unsigned int);
> +
> + #else
> +
> +-extern inline void *return_address(unsigned int level)
> ++static inline void *return_address(unsigned int level)
> + {
> +       return NULL;
> + }
> +diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
> +index fafedd8..f6aa84d 100644
> +--- a/arch/arm/kernel/return_address.c
> ++++ b/arch/arm/kernel/return_address.c
> +@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
> + #warning "TODO: return_address should use unwind tables"
> + #endif
> +
> +-void *return_address(unsigned int level)
> +-{
> +-      return NULL;
> +-}
> +-
> + #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
> +
> + EXPORT_SYMBOL_GPL(return_address);
> +--
> +cgit v0.10.2
> +
> diff --git a/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
> new file mode 100644
> index 0000000..0ab03fb
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
> @@ -0,0 +1,59 @@
> +From a2561791169351cbf1ac5ca0c4299a0eef7eca65 Mon Sep 17 00:00:00 2001
> +From: Behan Webster <behanw at converseincode.com>
> +Date: Tue, 3 Sep 2013 22:27:26 -0400
> +Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
> + glue-cache.h
> +
> +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). "static inline" is the correct choice
> +instead.
> +
> +Author: Behan Webster <behanw at converseincode.com>
> +Signed-off-by: Behan Webster <behanw at converseincode.com>
> +Reviewed-by: Mark Charlebois <charlebm at gmail.com>
> +---
> + arch/arm/include/asm/glue-cache.h | 22 +++++++++++-----------
> + 1 file changed, 11 insertions(+), 11 deletions(-)
> +
> +diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
> +index c81adc0..a3c24cd 100644
> +--- a/arch/arm/include/asm/glue-cache.h
> ++++ b/arch/arm/include/asm/glue-cache.h
> +@@ -130,22 +130,22 @@
> + #endif
> +
> + #ifndef __ASSEMBLER__
> +-extern inline void nop_flush_icache_all(void) { }
> +-extern inline void nop_flush_kern_cache_all(void) { }
> +-extern inline void nop_flush_kern_cache_louis(void) { }
> +-extern inline void nop_flush_user_cache_all(void) { }
> +-extern inline void nop_flush_user_cache_range(unsigned long a,
> ++static inline void nop_flush_icache_all(void) { }
> ++static inline void nop_flush_kern_cache_all(void) { }
> ++static inline void nop_flush_kern_cache_louis(void) { }
> ++static inline void nop_flush_user_cache_all(void) { }
> ++static inline void nop_flush_user_cache_range(unsigned long a,
> +               unsigned long b, unsigned int c) { }
> +
> +-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
> +-extern inline int nop_coherent_user_range(unsigned long a,
> ++static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
> ++static inline int nop_coherent_user_range(unsigned long a,
> +               unsigned long b) { return 0; }
> +-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
> ++static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
> +
> +-extern inline void nop_dma_flush_range(const void *a, const void *b) { }
> ++static inline void nop_dma_flush_range(const void *a, const void *b) { }
> +
> +-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
> +-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
> ++static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
> ++static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
> + #endif
> +
> + #ifndef MULTI_CACHE
> +--
> +2.1.4
> +
> diff --git a/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
> new file mode 100644
> index 0000000..6d06776
> --- /dev/null
> +++ b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
> @@ -0,0 +1,53 @@
> +From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001
> +From: Chunrong Guo <B40290 at freescale.com>
> +Date: Thu, 8 Oct 2015 22:48:22 -0500
> +Subject: [PATCH] use static inline in ARM lifeboot.h
> +
> +---
> + drivers/input/mouse/lifebook.h   | 2 +-
> + drivers/input/mouse/sentelic.h   | 2 +-
> + drivers/input/mouse/trackpoint.h | 2 +-
> + 3 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
> +index 4c4326c..e4c2453 100644
> +--- a/drivers/input/mouse/lifebook.h
> ++++ b/drivers/input/mouse/lifebook.h
> +@@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse);
> + inline void lifebook_module_init(void)
> + {
> + }
> +-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
> ++static inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
> + {
> +       return -ENOSYS;
> + }
> +diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
> +index aa697ec..9e69e94 100644
> +--- a/drivers/input/mouse/sentelic.h
> ++++ b/drivers/input/mouse/sentelic.h
> +@@ -123,7 +123,7 @@ struct fsp_data {
> + extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
> + extern int fsp_init(struct psmouse *psmouse);
> + #else
> +-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
> ++static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
> + {
> +       return -ENOSYS;
> + }
> +diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
> +index ecd0547..693735c 100644
> +--- a/drivers/input/mouse/trackpoint.h
> ++++ b/drivers/input/mouse/trackpoint.h
> +@@ -147,7 +147,7 @@ struct trackpoint_data
> + #ifdef CONFIG_MOUSE_PS2_TRACKPOINT
> + int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
> + #else
> +-inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
> ++static inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
> + {
> +       return -ENOSYS;
> + }
> +--
> +2.3.3
> +
> --
> 2.3.3
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


More information about the meta-freescale mailing list