[RCAR] disable a default config in kernel
[AGL/meta-agl.git] / meta-agl-bsp / recipes-bsp / u-boot / u-boot-ota / 0001-fixup-build-with-gcc6.patch
1 From ba619c7ec7820e80d1b5b520440fdb81c31c0baf Mon Sep 17 00:00:00 2001
2 From: Ronan Le Martret <ronan.lemartret@iot.bzh>
3 Date: Fri, 14 Oct 2016 09:03:11 +0200
4 Subject: [PATCH] fix gcc6 build
5
6 Signed-off-by: ronan <ronan@linux-pgnz.suse>
7 ---
8  include/linux/compiler-gcc6.h | 66 +++++++++++++++++++++++++++++++++++++++++++
9  1 file changed, 66 insertions(+)
10  create mode 100644 include/linux/compiler-gcc6.h
11
12 diff --git a/include/linux/compiler-gcc6.h b/include/linux/compiler-gcc6.h
13 new file mode 100644
14 index 0000000..a3d00d8
15 --- /dev/null
16 +++ b/include/linux/compiler-gcc6.h
17 @@ -0,0 +1,66 @@
18 +#ifndef __LINUX_COMPILER_H
19 +#error "Please don't include <linux/compiler-gcc6.h> directly, include <linux/compiler.h> instead."
20 +#endif
21 +
22 +#define __used                         __attribute__((__used__))
23 +#define __must_check                   __attribute__((warn_unused_result))
24 +#define __compiler_offsetof(a, b)      __builtin_offsetof(a, b)
25 +
26 +/* Mark functions as cold. gcc will assume any path leading to a call
27 +   to them will be unlikely.  This means a lot of manual unlikely()s
28 +   are unnecessary now for any paths leading to the usual suspects
29 +   like BUG(), printk(), panic() etc. [but let's keep them for now for
30 +   older compilers]
31 +
32 +   Early snapshots of gcc 4.3 don't support this and we can't detect this
33 +   in the preprocessor, but we can live with this because they're unreleased.
34 +   Maketime probing would be overkill here.
35 +
36 +   gcc also has a __attribute__((__hot__)) to move hot functions into
37 +   a special section, but I don't see any sense in this right now in
38 +   the kernel context */
39 +#define __cold                 __attribute__((__cold__))
40 +
41 +#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
42 +
43 +#ifndef __CHECKER__
44 +# define __compiletime_warning(message) __attribute__((warning(message)))
45 +# define __compiletime_error(message) __attribute__((error(message)))
46 +#endif /* __CHECKER__ */
47 +
48 +/*
49 + * Mark a position in code as unreachable.  This can be used to
50 + * suppress control flow warnings after asm blocks that transfer
51 + * control elsewhere.
52 + *
53 + * Early snapshots of gcc 4.5 don't support this and we can't detect
54 + * this in the preprocessor, but we can live with this because they're
55 + * unreleased.  Really, we need to have autoconf for the kernel.
56 + */
57 +#define unreachable() __builtin_unreachable()
58 +
59 +/* Mark a function definition as prohibited from being cloned. */
60 +#define __noclone      __attribute__((__noclone__))
61 +
62 +/*
63 + * Tell the optimizer that something else uses this function or variable.
64 + */
65 +#define __visible __attribute__((externally_visible))
66 +
67 +/*
68 + * GCC 'asm goto' miscompiles certain code sequences:
69 + *
70 + *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670
71 + *
72 + * Work it around via a compiler barrier quirk suggested by Jakub Jelinek.
73 + * Fixed in GCC 4.8.2 and later versions.
74 + *
75 + * (asm goto is automatically volatile - the naming reflects this.)
76 + */
77 +#define asm_volatile_goto(x...)        do { asm goto(x); asm (""); } while (0)
78 +
79 +#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
80 +#define __HAVE_BUILTIN_BSWAP32__
81 +#define __HAVE_BUILTIN_BSWAP64__
82 +#define __HAVE_BUILTIN_BSWAP16__
83 +#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
84 -- 
85 2.6.6
86