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