summaryrefslogtreecommitdiffstats
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)
downloadmeta-boot2qt-ac3620551872d8196505425648eaef9ee0bb771f.tar.gz
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 0000000..ee61a74
--- /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 @@
1From ef372125fd64fc181869be4cf528488f9e8b46c2 Mon Sep 17 00:00:00 2001
2From: Behan Webster <behanw@converseincode.com>
3Date: Wed, 24 Sep 2014 01:06:46 +0100
4Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
5
6With compilers which follow the C99 standard (like modern versions of gcc and
7clang), "extern inline" does the wrong thing (emits code for an externally
8linkable version of the inline function). In this case using static inline
9and removing the NULL version of return_address in return_address.c does
10the right thing.
11
12Signed-off-by: Behan Webster <behanw@converseincode.com>
13Reviewed-by: Mark Charlebois <charlebm@gmail.com>
14Acked-by: Steven Rostedt <rostedt@goodmis.org>
15Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16---
17 arch/arm/include/asm/ftrace.h | 2 +-
18 arch/arm/kernel/return_address.c | 5 -----
19 2 files changed, 1 insertion(+), 6 deletions(-)
20
21diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
22index f89515a..2bb8cac 100644
23--- a/arch/arm/include/asm/ftrace.h
24+++ b/arch/arm/include/asm/ftrace.h
25@@ -45,7 +45,7 @@ void *return_address(unsigned int);
26
27 #else
28
29-extern inline void *return_address(unsigned int level)
30+static inline void *return_address(unsigned int level)
31 {
32 return NULL;
33 }
34diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c
35index fafedd8..f6aa84d 100644
36--- a/arch/arm/kernel/return_address.c
37+++ b/arch/arm/kernel/return_address.c
38@@ -63,11 +63,6 @@ void *return_address(unsigned int level)
39 #warning "TODO: return_address should use unwind tables"
40 #endif
41
42-void *return_address(unsigned int level)
43-{
44- return NULL;
45-}
46-
47 #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / else */
48
49 EXPORT_SYMBOL_GPL(return_address);
50--
511.9.1
52
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 0000000..064e28b
--- /dev/null
+++ b/meta-smx6-extras/recipes/linux/linux-smx6/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch
@@ -0,0 +1,59 @@
1From eb38d22ea05961666878dfb88c68629eacfb1399 Mon Sep 17 00:00:00 2001
2From: Behan Webster <behanw@converseincode.com>
3Date: Tue, 3 Sep 2013 22:27:26 -0400
4Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in
5 glue-cache.h
6
7With compilers which follow the C99 standard (like modern versions of gcc and
8clang), "extern inline" does the wrong thing (emits code for an externally
9linkable version of the inline function). "static inline" is the correct choice
10instead.
11
12Author: Behan Webster <behanw@converseincode.com>
13Signed-off-by: Behan Webster <behanw@converseincode.com>
14Reviewed-by: Mark Charlebois <charlebm@gmail.com>
15---
16 arch/arm/include/asm/glue-cache.h | 22 +++++++++++-----------
17 1 file changed, 11 insertions(+), 11 deletions(-)
18
19diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h
20index c81adc0..a3c24cd 100644
21--- a/arch/arm/include/asm/glue-cache.h
22+++ b/arch/arm/include/asm/glue-cache.h
23@@ -130,22 +130,22 @@
24 #endif
25
26 #ifndef __ASSEMBLER__
27-extern inline void nop_flush_icache_all(void) { }
28-extern inline void nop_flush_kern_cache_all(void) { }
29-extern inline void nop_flush_kern_cache_louis(void) { }
30-extern inline void nop_flush_user_cache_all(void) { }
31-extern inline void nop_flush_user_cache_range(unsigned long a,
32+static inline void nop_flush_icache_all(void) { }
33+static inline void nop_flush_kern_cache_all(void) { }
34+static inline void nop_flush_kern_cache_louis(void) { }
35+static inline void nop_flush_user_cache_all(void) { }
36+static inline void nop_flush_user_cache_range(unsigned long a,
37 unsigned long b, unsigned int c) { }
38
39-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
40-extern inline int nop_coherent_user_range(unsigned long a,
41+static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { }
42+static inline int nop_coherent_user_range(unsigned long a,
43 unsigned long b) { return 0; }
44-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
45+static inline void nop_flush_kern_dcache_area(void *a, size_t s) { }
46
47-extern inline void nop_dma_flush_range(const void *a, const void *b) { }
48+static inline void nop_dma_flush_range(const void *a, const void *b) { }
49
50-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { }
51-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
52+static inline void nop_dma_map_area(const void *s, size_t l, int f) { }
53+static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { }
54 #endif
55
56 #ifndef MULTI_CACHE
57--
581.9.1
59
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 330a4f1..4f05ca1 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 @@
19## 19##
20############################################################################## 20##############################################################################
21 21
22FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
23SRC_URI += " \
24 file://0001-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
25 file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch \
26 "
27
22do_configure_prepend() { 28do_configure_prepend() {
23 sed -e '/CONFIG_USB_FUNCTIONFS_ETH=/d' \ 29 sed -e '/CONFIG_USB_FUNCTIONFS_ETH=/d' \
24 -e '/CONFIG_USB_FUNCTIONFS_RNDIS=/d' \ 30 -e '/CONFIG_USB_FUNCTIONFS_RNDIS=/d' \