build: Fixed include compiler-gcc.h directly error
Commit Message
From: Jasmin Jessich <jasmin@anw.at>
The type definitions have been splitting from compiler.h into
compiler_types.h. This requires to check for the new and the old
include guard in compiler-gcc.h.
Signed-off-by: Jasmin Jessich <jasmin@anw.at>
---
backports/backports.txt | 3 +++
backports/v4.14_compiler_h.patch | 11 +++++++++++
2 files changed, 14 insertions(+)
create mode 100644 backports/v4.14_compiler_h.patch
Comments
Hello Hans!
I am not sure why compiler-gcc.h is used from the kernel tree and not from
the installed kernel headers. So a better fix for this problem might be to
remove compiler-gcc.h from media_build/linux/Makefile. This is something
you will know better.
Please note that this doesn't fix all issues (pvrusb2-hdw.c doesn't compile
for Kernel 4.4.), but I am working on that currently.
BR,
Jasmin
@@ -26,6 +26,9 @@ add pr_fmt.patch
add debug.patch
add drx39xxj.patch
+[4.14.255]
+add v4.14_compiler_h.patch
+
[4.12.255]
add v4.12_revert_solo6x10_copykerneluser.patch
new file mode 100644
@@ -0,0 +1,11 @@
+diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
+index 2272ded..744334e 100644
+--- a/include/linux/compiler-gcc.h
++++ b/include/linux/compiler-gcc.h
+@@ -1,5 +1,5 @@
+ /* SPDX-License-Identifier: GPL-2.0 */
+-#ifndef __LINUX_COMPILER_TYPES_H
++#if (!defined(__LINUX_COMPILER_TYPES_H) && !defined (__LINUX_COMPILER_H))
+ #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
+ #endif
+