diff options
Diffstat (limited to 'recipes-bsp')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ls1/0001-uboot-support-gcc5.patch | 90 | ||||
-rw-r--r-- | recipes-bsp/u-boot/u-boot-ls1_2015.01.bb | 1 |
2 files changed, 91 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-ls1/0001-uboot-support-gcc5.patch b/recipes-bsp/u-boot/u-boot-ls1/0001-uboot-support-gcc5.patch new file mode 100644 index 0000000..c269df0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-ls1/0001-uboot-support-gcc5.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | From 3afcde1104f3fa9102911467929d5752eff484aa Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <B40290@freescale.com> | ||
3 | Date: Thu, 29 Oct 2015 03:18:58 -0500 | ||
4 | Subject: [PATCH] uboot : support gcc5 | ||
5 | |||
6 | |||
7 | Fixed the following build errors with gcc5: | ||
8 | |error: linux/compiler-gcc5.h: No such file or directory | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | --- | ||
13 | include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++++ | ||
14 | 1 file changed, 65 insertions(+) | ||
15 | create mode 100644 include/linux/compiler-gcc5.h | ||
16 | |||
17 | diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h | ||
18 | new file mode 100644 | ||
19 | index 0000000..c8c5659 | ||
20 | --- /dev/null | ||
21 | +++ b/include/linux/compiler-gcc5.h | ||
22 | @@ -0,0 +1,65 @@ | ||
23 | +#ifndef __LINUX_COMPILER_H | ||
24 | +#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> instead." | ||
25 | +#endif | ||
26 | + | ||
27 | +#define __used __attribute__((__used__)) | ||
28 | +#define __must_check __attribute__((warn_unused_result)) | ||
29 | +#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) | ||
30 | + | ||
31 | +/* Mark functions as cold. gcc will assume any path leading to a call | ||
32 | + to them will be unlikely. This means a lot of manual unlikely()s | ||
33 | + are unnecessary now for any paths leading to the usual suspects | ||
34 | + like BUG(), printk(), panic() etc. [but let's keep them for now for | ||
35 | + older compilers] | ||
36 | + | ||
37 | + Early snapshots of gcc 4.3 don't support this and we can't detect this | ||
38 | + in the preprocessor, but we can live with this because they're unreleased. | ||
39 | + Maketime probing would be overkill here. | ||
40 | + | ||
41 | + gcc also has a __attribute__((__hot__)) to move hot functions into | ||
42 | + a special section, but I don't see any sense in this right now in | ||
43 | + the kernel context */ | ||
44 | +#define __cold __attribute__((__cold__)) | ||
45 | + | ||
46 | +#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) | ||
47 | + | ||
48 | +#ifndef __CHECKER__ | ||
49 | +# define __compiletime_warning(message) __attribute__((warning(message))) | ||
50 | +# define __compiletime_error(message) __attribute__((error(message))) | ||
51 | +#endif /* __CHECKER__ */ | ||
52 | + | ||
53 | +/* | ||
54 | + * Mark a position in code as unreachable. This can be used to | ||
55 | + * suppress control flow warnings after asm blocks that transfer | ||
56 | + * control elsewhere. | ||
57 | + * | ||
58 | + * Early snapshots of gcc 4.5 don't support this and we can't detect | ||
59 | + * this in the preprocessor, but we can live with this because they're | ||
60 | + * unreleased. Really, we need to have autoconf for the kernel. | ||
61 | + */ | ||
62 | +#define unreachable() __builtin_unreachable() | ||
63 | + | ||
64 | +/* Mark a function definition as prohibited from being cloned. */ | ||
65 | +#define __noclone __attribute__((__noclone__)) | ||
66 | + | ||
67 | +/* | ||
68 | + * Tell the optimizer that something else uses this function or variable. | ||
69 | + */ | ||
70 | +#define __visible __attribute__((externally_visible)) | ||
71 | + | ||
72 | +/* | ||
73 | + * GCC 'asm goto' miscompiles certain code sequences: | ||
74 | + * | ||
75 | + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
76 | + * | ||
77 | + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
78 | + * | ||
79 | + * (asm goto is automatically volatile - the naming reflects this.) | ||
80 | + */ | ||
81 | +#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
82 | + | ||
83 | +#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | ||
84 | +#define __HAVE_BUILTIN_BSWAP32__ | ||
85 | +#define __HAVE_BUILTIN_BSWAP64__ | ||
86 | +#define __HAVE_BUILTIN_BSWAP16__ | ||
87 | +#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ | ||
88 | -- | ||
89 | 2.3.3 | ||
90 | |||
diff --git a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb b/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb index 0a1fb80..5b1e566 100644 --- a/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb +++ b/recipes-bsp/u-boot/u-boot-ls1_2015.01.bb | |||
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = " \ | |||
12 | 12 | ||
13 | SRCBRANCH = "master" | 13 | SRCBRANCH = "master" |
14 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH}" | 14 | SRC_URI = "git://git.freescale.com/ppc/sdk/u-boot.git;branch=${SRCBRANCH}" |
15 | SRC_URI += "file://0001-uboot-support-gcc5.patch " | ||
15 | SRCREV = "6ba8eedbcdc4b063f59a63e6288b938af739e8ad" | 16 | SRCREV = "6ba8eedbcdc4b063f59a63e6288b938af739e8ad" |
16 | 17 | ||
17 | LOCALVERSION ?= "+ls1" | 18 | LOCALVERSION ?= "+ls1" |