diff options
Diffstat (limited to 'recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch')
-rw-r--r-- | recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch b/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch new file mode 100644 index 00000000..aef97ea6 --- /dev/null +++ b/recipes-kernel/linux/linux-fslc-imx/0001-Backport-minimal-compiler_attributes.h-to-support-GC.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From fe5844365ec6c4d61838f289926f4d55da94d2fb Mon Sep 17 00:00:00 2001 | ||
2 | From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | ||
3 | Date: Fri, 2 Aug 2019 12:37:56 +0200 | ||
4 | Subject: [PATCH 1/2] Backport minimal compiler_attributes.h to support GCC 9 | ||
5 | |||
6 | This adds support for __copy to v4.9.y so that we can use it in | ||
7 | init/exit_module to avoid -Werror=missing-attributes errors on GCC 9. | ||
8 | |||
9 | Link: https://lore.kernel.org/lkml/259986242.BvXPX32bHu@devpool35/ | ||
10 | Cc: <stable@vger.kernel.org> | ||
11 | Suggested-by: Rolf Eike Beer <eb@emlix.com> | ||
12 | Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> | ||
13 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
14 | --- | ||
15 | include/linux/compiler.h | 16 ++++++++++++++++ | ||
16 | 1 file changed, 16 insertions(+) | ||
17 | |||
18 | diff --git a/include/linux/compiler.h b/include/linux/compiler.h | ||
19 | index 3050de0dac96..0020ee1cab37 100644 | ||
20 | --- a/include/linux/compiler.h | ||
21 | +++ b/include/linux/compiler.h | ||
22 | @@ -54,6 +54,22 @@ extern void __chk_io_ptr(const volatile void __iomem *); | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | |||
26 | +/* | ||
27 | + * Minimal backport of compiler_attributes.h to add support for __copy | ||
28 | + * to v4.9.y so that we can use it in init/exit_module to avoid | ||
29 | + * -Werror=missing-attributes errors on GCC 9. | ||
30 | + */ | ||
31 | +#ifndef __has_attribute | ||
32 | +# define __has_attribute(x) __GCC4_has_attribute_##x | ||
33 | +# define __GCC4_has_attribute___copy__ 0 | ||
34 | +#endif | ||
35 | + | ||
36 | +#if __has_attribute(__copy__) | ||
37 | +# define __copy(symbol) __attribute__((__copy__(symbol))) | ||
38 | +#else | ||
39 | +# define __copy(symbol) | ||
40 | +#endif | ||
41 | + | ||
42 | #ifdef __GNUC__ | ||
43 | #include <linux/compiler-gcc.h> | ||
44 | #endif | ||
45 | -- | ||
46 | 2.17.1 | ||
47 | |||