tools headers: Get tools's linux/compiler.h closer to the kernel's
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 18 Dec 2020 12:59:05 +0000 (09:59 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 18 Dec 2020 20:32:26 +0000 (17:32 -0300)
We're cherry picking stuff from the kernel to allow for the other
headers that we keep in sync via tools/perf/check-headers.sh to work,
so introduce linux/compiler_types.h and from there get the compiler
specific stuff.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/linux/compiler.h
tools/include/linux/compiler_types.h [new file with mode: 0644]

index d22a974372c0e212433a512611ddbef78c2c74f5..ff872dc2637c54991faffb39657052ac49c3a80c 100644 (file)
@@ -2,9 +2,7 @@
 #ifndef _TOOLS_LINUX_COMPILER_H_
 #define _TOOLS_LINUX_COMPILER_H_
 
-#ifdef __GNUC__
-#include <linux/compiler-gcc.h>
-#endif
+#include <linux/compiler_types.h>
 
 #ifndef __compiletime_error
 # define __compiletime_error(message)
diff --git a/tools/include/linux/compiler_types.h b/tools/include/linux/compiler_types.h
new file mode 100644 (file)
index 0000000..31fc2ca
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __LINUX_COMPILER_TYPES_H
+#define __LINUX_COMPILER_TYPES_H
+
+/* Compiler specific macros. */
+#ifdef __GNUC__
+#include <linux/compiler-gcc.h>
+#endif
+
+#endif /* __LINUX_COMPILER_TYPES_H */