aboutsummaryrefslogtreecommitdiffstats
path: root/meta-smx6-extras
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2016-04-12 14:05:39 +0300
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2016-04-13 09:30:40 +0000
commitac3620551872d8196505425648eaef9ee0bb771f (patch)
tree724ac00ed7585d53a9d3cce3c320abee9ae4a614 /meta-smx6-extras
parent17412f4a768e36ba5ecd899610f556424a9471df (diff)
smarc-samx6i: fix kernel build
Cherry-pick needed changes to make kernel build with gcc5 Change-Id: Ib930f4cc2601318d98f9bac246a209333859289f Reviewed-by: Teemu Holappa <teemu.holappa@theqtcompany.com>
Diffstat (limited to 'meta-smx6-extras')
-rw-r--r--meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch52
-rw-r--r--meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch59
-rw-r--r--meta-smx6-extras/recipes/linux/linux-smx6_3.14.28.bbappend6
3 files changed, 117 insertions, 0 deletions
diff --git a/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch b/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
new file mode 100644
index 00000000..ee61a743
--- /dev/null
+++ b/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
@@ -0,0 +1,52 @@
+From ef372125fd64fc181869be4cf528488f9e8b46c2 Mon Sep 17 00:00:00 2001
+From: Behan Webster <behanw@converseincode.com>
+Date: Wed, 24 Sep 2014 01:06:46 +0100
+Subject: [PATCH] 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@converseincode.com>
+Reviewed-by: Mark Charlebois <charlebm@gmail.com>
+Acked-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+ arch/arm/include/asm/ftrace.h | 2 +-
+ arch/arm/kernel/return_address.c | 5 -----
+ 2 files changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
+index f89515a..2bb8cac 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);
+--
+1.9.1
+
diff --git a/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch b/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch
new file mode 100644
index 00000000..064e28b0
--- /dev/null
+++ b/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch
@@ -0,0 +1,59 @@
+From eb38d22ea05961666878dfb88c68629eacfb1399 Mon Sep 17 00:00:00 2001
+From: Behan Webster <behanw@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@converseincode.com>
+Signed-off-by: Behan Webster <behanw@converseincode.com>
+Reviewed-by: Mark Charlebois <charlebm@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
+--
+1.9.1
+
diff --git a/meta-smx6-extras/recipes/linux/linux-smx6_3.14.28.bbappend b/meta-smx6-extras/recipes/linux/linux-smx6_3.14.28.bbappend
index 330a4f18..4f05ca18 100644
--- a/meta-smx6-extras/recipes/linux/linux-smx6_3.14.28.bbappend
+++ b/meta-smx6-extras/recipes/linux/linux-smx6_3.14.28.bbappend
@@ -19,6 +19,12 @@
##
##############################################################################
+FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
+SRC_URI += " \
+ file://0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
+ file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch \
+ "
+
do_configure_prepend() {
sed -e '/CONFIG_USB_FUNCTIONFS_ETH=/d' \
-e '/CONFIG_USB_FUNCTIONFS_RNDIS=/d' \